2022-01-14 04:57:24 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2022-01-15 05:33:32 +00:00
|
|
|
# wrapper for common keybinds across environments
|
|
|
|
# by Derek Stevens <nilix@nilfm.cc>
|
|
|
|
# MIT License
|
|
|
|
|
2022-01-14 04:57:24 +00:00
|
|
|
helpme(){
|
|
|
|
echo "$0 < v | b > < args >"
|
|
|
|
echo " args for v (volume) command:"
|
|
|
|
echo " u, d, m, mm (up, down, toggle mute, toggle mic mute)"
|
|
|
|
echo " args for b (brightness) command:"
|
|
|
|
echo " u, d (up, down)"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ -z "$2" ]; then
|
|
|
|
helpme
|
|
|
|
fi
|
|
|
|
|
|
|
|
case ${1}${2} in
|
|
|
|
"vu")
|
|
|
|
amixer set Master 5%+; notify-send -u low -c volume volume $(amixer get Master | grep % | head -n 1 | awk '{print $5}')
|
|
|
|
;;
|
|
|
|
"vd")
|
|
|
|
amixer set Master 5%-; notify-send -u low -c volume volume $(amixer get Master | grep % | head -n 1 | awk '{print $5}')
|
|
|
|
;;
|
|
|
|
"vm")
|
|
|
|
amixer set Master toggle
|
|
|
|
;;
|
|
|
|
"vmm")
|
|
|
|
amixer set Capture toggle
|
|
|
|
;;
|
|
|
|
"bu")
|
|
|
|
xbacklight -inc 5; notify-send -u low -c brightness brightness [$(xbacklight -get)%]
|
|
|
|
;;
|
|
|
|
"bd")
|
|
|
|
xbacklight -dec 5; notify-send -u low -c brightness brightness [$(xbacklight -get)%]
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
helpme;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|