From 4b65846d2e369636e1c947c98c31507d4c08af10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Sun, 6 Aug 2023 15:56:08 +0200 Subject: 6 garbage --- skripti/toggle_mouse.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 skripti/toggle_mouse.sh (limited to 'skripti') diff --git a/skripti/toggle_mouse.sh b/skripti/toggle_mouse.sh new file mode 100755 index 0000000..91a2d66 --- /dev/null +++ b/skripti/toggle_mouse.sh @@ -0,0 +1,17 @@ +#!/bin/sh +set -xe +function toggle () { + k=$(((`xinput list-props $1 | grep Device\ Enabled | cut -f3`+1)%2)) + xinput set-prop $1 "Device Enabled" $k + echo $k > /sys/class/leds/input4\:\:capslock/brightness +} +if [ x$1 != x ] +then + toggle $1 + exit +fi + +for i in `xinput | grep SYNA | cut -f2 | cut -d= -f2 | sort -g | head -n2 | tail -n1` +do + toggle $i +done -- cgit v1.2.3