1
0
Fork 0

add toggles for touchpad and compositor

This commit is contained in:
Luca Bilke 2023-07-14 17:59:45 +02:00
parent 1094fc5ac4
commit 7bfad45303
3 changed files with 20 additions and 1 deletions

11
.local/bin/togcom Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
if pidof picom; then
killall picom
notify-send -h string:x-dunst-stack-tag:"togcom" \
"Compositor Off"
else
setsid -f picom
notify-send -h string:x-dunst-stack-tag:"togcom" \
"Compositor On"
fi

8
.local/bin/togtp Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
TPdevice=$( xinput | sed -nre '/TouchPad|Touchpad/s/.*id=([0-9]*).*/\1/p' )
if xinput list-props "$TPdevice" | grep -oPq "Device Enabled \(\d*\):\s*1"; then
xinput --disable "$TPdevice" && notify-send -h string:x-dunst-stack-tag:"togtp" "Touchpad Disabled" -i input-touchpad-off
else
xinput --enable "$TPdevice" && notify-send -h string:x-dunst-stack-tag:"togtp" "Touchpad Enabled" -i input-touchpad-on
fi

@ -1 +1 @@
Subproject commit cb969d56e704a4efbf8e93739c6fa34bf64c0143
Subproject commit a82dbeed9037b866b5fa2fa1e473d84d97edff29