myhome/.local/bin/mouse-set
2020-05-09 13:43:39 +02:00

11 lines
336 B
Bash
Executable File

#!/bin/bash
choices="Off\nCycle"
chosen=$(echo -e "$choices" | dmenu -i)
mouse=$(sudo ratbag-command list | awk '{print $1}' | sed 's/://')
case "$chosen" in
Off) sudo ratbag-command led 0 set mode off $mouse ;;
Cycle) sudo ratbag-command led 0 set mode cycle $mouse && sudo ratbag-command led 0 set rate 25000 $mouse ;;
esac