summaryrefslogtreecommitdiff
path: root/wide_play_helper.sh
diff options
context:
space:
mode:
Diffstat (limited to 'wide_play_helper.sh')
-rwxr-xr-xwide_play_helper.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/wide_play_helper.sh b/wide_play_helper.sh
new file mode 100755
index 0000000..a3de252
--- /dev/null
+++ b/wide_play_helper.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+
+SHORTCUTS=(
+ 'FUNCTION | TERMINAL EQUIVALENT | RECOMMENDED KEYBIND'
+ '---------------------------------------------------------------------------------------'
+ 'Play/Pause Song | wide_play_helper.sh -t | Shift+F8'
+ 'Skip to Next Song | wide_play_helper.sh -n | Shift+F9'
+ 'Go Back to Previous Song | wide_play_helper.sh -p | Shift+F10'
+ 'Toggle Autoplay | wide_play_helper.sh -a | Ctrl+F9'
+ 'Toggle Consume | wide_play_helper.sh -c | Ctrl+F10'
+ 'Increase Volume | wide_play_helper.sh -V | Shift+Upper side mouse button'
+ 'Decrease Volume | wide_play_helper.sh -v | Shift+Lower side mouse button'
+)
+
+next_song="$(mpc queued)"
+
+while getopts "htnpacvV" opt; do
+ case $opt in
+ h) echo -e "usage: $0 [-h help] [-n notify-send queue] [-l list] [-q queue] [-c clear]\n\nSuggested Keyboard Shortcuts:\n"; printf '%s\n' "${SHORTCUTS[@]}"; exit ;; # PRINT HELP IN TERMINAL
+ t) mpc toggle ; exit;;
+ n) [[ -n "$next_song" ]] && mpc next ; exit ;;
+ p) mpc cdprev ; exit ;;
+ a) mpc single ; exit ;;
+ c) mpc consume ; exit ;;
+ v) mpc volume -5 ; exit ;;
+ V) mpc volume +5 ; exit ;;
+ ?) echo "error: option -$OPTARG is not implemented"; exit ;;
+ esac
+done