diff --git a/.config/i3pystatus/config.py b/.config/i3pystatus/config.py index 15a971f..368960b 100644 --- a/.config/i3pystatus/config.py +++ b/.config/i3pystatus/config.py @@ -71,6 +71,13 @@ status.register("shell", hints = {"markup": "pango"}, command="/home/kunsi/.config/i3pystatus/rfkill-bt.py", interval=1) +status.register("shell", + format="{output}", + hints = {"markup": "pango"}, + command="/home/kunsi/.config/i3pystatus/touchscreen.sh", + interval=1, + on_leftclick="xinput enable 'ELAN Touchscreen'", + on_rightclick="xinput disable 'ELAN Touchscreen'") status.register("network", interface="wlp4s0", diff --git a/.config/i3pystatus/touchscreen.sh b/.config/i3pystatus/touchscreen.sh new file mode 100755 index 0000000..5ab9b24 --- /dev/null +++ b/.config/i3pystatus/touchscreen.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +OUT=$(xinput list-props 'ELAN Touchscreen' | awk '/^\tDevice Enabled \([0-9]+\):\t[01]/ {print $NF}') + +echo -n 'Touch'