Added script to handle button actions

This commit is contained in:
Mahesh Asolkar 2023-12-25 11:35:15 -08:00
parent 70c89479ad
commit 00c69cb17c

26
dwl_act Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/env bash
act=$1
echo "$0 - $act" >> ~/dwl_key_act.log
# In Wayland, use the following like X11's xev:
#
# % wev | grep "sym"
#
case $act in
vol_mute) wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle;;
vol_lower) wpctl set-volume --limit 1.0 @DEFAULT_AUDIO_SINK@ 10%-;;
vol_raise) wpctl set-volume --limit 1.0 @DEFAULT_AUDIO_SINK@ 10%+;;
# mic_mute) ;;
# bright_low) ;;
# bright_high) ;;
# disp) ;;
# wlan) ;;
# tools) ;;
# search) ;;
# launch) ;;
# explore) ;;
*) echo "Unknown action '$act'";;
esac