feat: helper script to toggle touchpad input
This commit is contained in:
@@ -20,6 +20,20 @@
|
||||
esac
|
||||
${pkgs.kdePackages.libkscreen}/bin/kscreen-doctor output.eDP-1.rotation.$direction
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "toggle-touchpad" ''
|
||||
touchpad=$(awk '$0 ~ /touchpad/I { split(FILENAME, path, "/") } END { print path[5] }' /sys/class/input/event*/device/name)
|
||||
device=/org/kde/KWin/InputDevice/$touchpad
|
||||
get_property=org.freedesktop.DBus.Properties.Get
|
||||
interface=org.kde.KWin.InputDevice
|
||||
if test $(qdbus org.kde.KWin $device $get_property $interface enabled) = true; then
|
||||
toggle=false
|
||||
else
|
||||
toggle=true
|
||||
fi
|
||||
|
||||
qdbus org.kde.KWin $device $interface.enabled $toggle
|
||||
'')
|
||||
];
|
||||
home.file.".config/kglobalshortcutsrc".source = ./sources/kglobalshortcutsrc;
|
||||
home.file.".config/kwinrc".source = ./sources/kwinrc;
|
||||
|
||||
Reference in New Issue
Block a user