Invoke GNOME overview via a mouse button (under Wayland)

Share your own howto's etc. Not for support questions!

Invoke GNOME overview via a mouse button (under Wayland)

Postby ninlith » 2018-08-01 03:24

Depends on evemu-tools.

Code: Select all
#!/bin/bash

EVENT="BTN_EXTRA 0"
MOUSE_DEVICE=$(readlink -f /dev/input/by-path/*event-mouse)

function toggle_overview() {
    dbus-send --session --type=method_call --dest=org.gnome.Shell \
        /org/gnome/Shell org.gnome.Shell.Eval string:'Main.overview.toggle();'
}

sudo evemu-record "$MOUSE_DEVICE" | \
    while read line; do \
        echo $line | grep "$EVENT" && toggle_overview; \
    done
ninlith
 
Posts: 10
Joined: 2008-01-17 19:24
Location: Finland

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable