2022-12-06 08:01:44 +01:00
|
|
|
#!/bin/sh
|
|
|
|
. $HOME/.bin/_config
|
|
|
|
|
2024-01-08 23:06:28 +01:00
|
|
|
SEL=$(printf "BACKLIGHT\nAUDIODEVICE\nVOLUME\nLIDACTION\nSCREEN\nCONFIGFILES" \
|
2022-12-06 08:01:44 +01:00
|
|
|
| $DMENU_CMD -p Mailbox)
|
|
|
|
|
|
|
|
case $SEL in
|
|
|
|
"BACKLIGHT")
|
|
|
|
S=$(printf "10\n20\n30\n40\n50\n60\n70\n80\n90\n100" | $DMENU_CMD -p Backlight)
|
|
|
|
doas wsconsctl display.brightness=$S
|
|
|
|
;;
|
|
|
|
"LIDACTION")
|
|
|
|
A=$(printf "enable\ndisable" | $DMENU_CMD -p Lidaction)
|
|
|
|
case $A in
|
|
|
|
"enable") doas sysctl machdep.lidaction=1; ;;
|
|
|
|
"disable") doas sysctl machdep.lidaction=0; ;;
|
|
|
|
esac
|
|
|
|
;;
|
2024-01-08 23:06:28 +01:00
|
|
|
"VOLUME")
|
|
|
|
S=$(printf "10\n20\n30\n40\n50\n60\n70\n80\n90\n100" | $DMENU_CMD -p Volume)
|
|
|
|
sndioctl output.level=$(echo "scale=3;$S/100" | bc)
|
|
|
|
;;
|
2022-12-06 08:01:44 +01:00
|
|
|
"CONFIGFILES")
|
|
|
|
C=$(printf "cwmrc\nvimrc\nkshrc\nvimb\nmuttrc\nspectrwm" | sort | $DMENU_CMD -p File)
|
|
|
|
case $C in
|
|
|
|
"cwmrc") texec "vim $HOME/.cwmrc"; ;;
|
|
|
|
"mailcap") texec "vim $HOME/.mutt/mailcap"; ;;
|
|
|
|
"muttrc") texec "vim $HOME/.mutt/rc-common $HOME/.mutt/rc-account-*"; ;;
|
|
|
|
"spectrwm") texec "vim $HOME/.config/spectrwm/spectrwm.conf"; ;;
|
|
|
|
"vimb") texec "vim $HOME/.config/vimb/config"; ;;
|
|
|
|
"vimrc") texec "vim $HOME/.vim/vimrc"; ;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
esac
|