diff --git a/.config/i3/layers/config.post-main-10-audio b/.config/i3/layers/config.post-main-10-audio index 9ba53ed..ca90061 100644 --- a/.config/i3/layers/config.post-main-10-audio +++ b/.config/i3/layers/config.post-main-10-audio @@ -5,10 +5,12 @@ bindsym XF86AudioMute exec --no-startup-id pavolctl toggle Master bindsym XF86AudioMicMute exec --no-startup-id pavolctl toggle Capture # Set cmus controls -bindsym XF86AudioStop exec --no-startup-id "cmusctl -c stop" -bindsym XF86AudioPlay exec --no-startup-id "cmusctl -c pause" -bindsym XF86AudioPrev exec --no-startup-id "cmusctl -c prev" -bindsym XF86AudioNext exec --no-startup-id "cmusctl -c next" +bindsym XF86AudioStop exec --no-startup-id "cmusctl -c --stop" +bindsym XF86AudioPlay exec --no-startup-id "cmusctl -c --pause" +bindsym XF86AudioPrev exec --no-startup-id "cmusctl -c --prev" +bindsym XF86AudioNext exec --no-startup-id "cmusctl -c --next" +bindsym Ctrl+XF86AudioPrev exec --no-startup-id "cmusctl -c '--seek -5s'" +bindsym Ctrl+XF86AudioNext exec --no-startup-id "cmusctl -c '--seek +5s'" # Write cmus file for i3status exec_always --no-startup-id cmusctl -l -e 2 diff --git a/.local/bin/cmusctl b/.local/bin/cmusctl index 8438850..36707d2 100755 --- a/.local/bin/cmusctl +++ b/.local/bin/cmusctl @@ -134,7 +134,8 @@ if $LOOP && multiple_instances_running; then fi fi -[ -n "$COMMAND" ] && cmus-remote "--$COMMAND" +# shellcheck disable=SC2086 +[ -n "$COMMAND" ] && cmus-remote $COMMAND while true; do QUERY_RESULT="$(cmus-remote --query 2>/dev/null)"