forked from kunsi/dotfiles
i3pystatus: add controls for trackpad
This commit is contained in:
parent
92f0fd8395
commit
c981797e33
2 changed files with 19 additions and 0 deletions
|
@ -87,6 +87,13 @@ status.register("shell",
|
||||||
interval=1,
|
interval=1,
|
||||||
on_leftclick="xinput enable 'ELAN Touchscreen'",
|
on_leftclick="xinput enable 'ELAN Touchscreen'",
|
||||||
on_rightclick="xinput disable 'ELAN Touchscreen'")
|
on_rightclick="xinput disable 'ELAN Touchscreen'")
|
||||||
|
status.register("shell",
|
||||||
|
format="{output}",
|
||||||
|
hints = {"markup": "pango"},
|
||||||
|
command="/home/kunsi/.config/i3pystatus/trackpad.sh",
|
||||||
|
interval=1,
|
||||||
|
on_leftclick="xinput enable 'SynPS/2 Synaptics TouchPad'",
|
||||||
|
on_rightclick="xinput disable 'SynPS/2 Synaptics TouchPad'")
|
||||||
|
|
||||||
status.register("network",
|
status.register("network",
|
||||||
interface="wlp4s0",
|
interface="wlp4s0",
|
||||||
|
|
12
.config/i3pystatus/trackpad.sh
Executable file
12
.config/i3pystatus/trackpad.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
OUT=$(xinput list-props 'SynPS/2 Synaptics TouchPad' | 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 '">Trackpad</span>'
|
Loading…
Reference in a new issue