[UPDATE][SCRIPT] Better notification for touchpad
Using a Dunst feature, a notification of the same type can override one that is currently being displayed.
This commit is contained in:
parent
e3c85a7df5
commit
28f5adcebe
|
@ -4,10 +4,12 @@
|
||||||
device=11
|
device=11
|
||||||
state=$(xinput list-props "$device" | grep "Device Enabled" | grep -o "[01]$")
|
state=$(xinput list-props "$device" | grep "Device Enabled" | grep -o "[01]$")
|
||||||
|
|
||||||
if [ "$state" == "1" ];then
|
if [ "$state" = "1" ];then
|
||||||
xinput --disable "$device"
|
xinput --disable "$device"
|
||||||
notify-send -t 500 -u low "Toggled touchpad (disabled)"
|
notify-send -u low "Toggled touchpad (disabled)" \
|
||||||
|
-h string:x-canonical-private-synchronous:touchpad # Override previous one
|
||||||
else
|
else
|
||||||
xinput --enable "$device"
|
xinput --enable "$device"
|
||||||
notify-send -t 500 -u low "Toggled touchpad (enabled)"
|
notify-send -u low "Toggled touchpad (enabled)" \
|
||||||
|
-h string:x-canonical-private-synchronous:touchpad # Override previous one
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue