#!/bin/bash speed="-0.5" trackp_enabled=$(dconf read /org/gnome/desktop/peripherals/mouse/trackpoint-toggle-on) #cur_speed=$(dconf read /org/gnome/desktop/peripherals/mouse/speed) if [[ "$trackp_enabled" != "'true'" ]]; then dconf write /org/gnome/desktop/peripherals/mouse/accel-profile "'flat'" dconf write /org/gnome/desktop/peripherals/mouse/speed $speed dconf write /org/gnome/desktop/peripherals/mouse/trackpoint-toggle-on "'true'" else dconf write /org/gnome/desktop/peripherals/mouse/accel-profile "'default'" dconf write /org/gnome/desktop/peripherals/mouse/speed 0 dconf reset /org/gnome/desktop/peripherals/mouse/trackpoint-toggle-on fi cur_prof=$(dconf read /org/gnome/desktop/peripherals/mouse/accel-profile) cur_speed=$(dconf read /org/gnome/desktop/peripherals/mouse/speed) notify-send --transient "trackpoint-toggle.sh" "Mouse speed settings changed to $cur_speed, profile $cur_prof"