add toggles for touchpad and compositor
This commit is contained in:
parent
1094fc5ac4
commit
7bfad45303
3 changed files with 20 additions and 1 deletions
11
.local/bin/togcom
Executable file
11
.local/bin/togcom
Executable 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
8
.local/bin/togtp
Executable 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
|
Loading…
Add table
Reference in a new issue