dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

dwmblock-touchpad (503B)


      1 #!/bin/sh
      2 touchpad="VEN_0488:00 0488:1024 Touchpad"
      3 enabled="$(xinput list-props "$touchpad" | awk -F':\\s*' '/Device Enabled/ { print $2 }')"
      4 
      5 case "$BUTTON" in
      6   3)
      7     case "$enabled" in
      8       1)
      9         xinput disable "$touchpad"
     10         pkill -RTMIN+15 dwmblocks
     11         ;;
     12       0)
     13         xinput enable "$touchpad"
     14         pkill -RTMIN+15 dwmblocks
     15         ;;
     16     esac
     17     ;;
     18   6) "$TERMINAL" -e "$EDITOR" "$0";;
     19 esac
     20 
     21 case "$enabled" in
     22   1) s='🖱';;
     23   0) s='🖱 ❌';;
     24 esac
     25 printf '%s' "$s"