forked from kunsi/dotfiles
add touchscreen status to i3pystatus
This commit is contained in:
parent
f5a411fed4
commit
e5eda5a043
2 changed files with 19 additions and 0 deletions
|
@ -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",
|
||||
|
|
12
.config/i3pystatus/touchscreen.sh
Executable file
12
.config/i3pystatus/touchscreen.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
OUT=$(xinput list-props 'ELAN Touchscreen' | awk '/^\tDevice Enabled \([0-9]+\):\t[01]/ {print $NF}')
|
||||
|
||||
echo -n '<span color="'
|
||||
if [ $OUT -eq 0 ]
|
||||
then
|
||||
echo -n "#FF9900"
|
||||
else
|
||||
echo -n "#00FF00"
|
||||
fi
|
||||
echo '">Touch</span>'
|
Loading…
Reference in a new issue