diff --git a/base/arch/run_spotify.sh b/base/arch/run_spotify.sh new file mode 100755 index 00000000..70ab8a55 --- /dev/null +++ b/base/arch/run_spotify.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +DESKTOP=${1:-7} +bspc desktop --focus "^$DESKTOP" +spotify diff --git a/base/arch/topic.config.yml b/base/arch/topic.config.yml index c1c81f9a..e80d5c40 100644 --- a/base/arch/topic.config.yml +++ b/base/arch/topic.config.yml @@ -8,6 +8,9 @@ arch_config: - src: focus_or_run.sh dest: "{{ xdg_bin_home }}/" rename: focus_or_run + - src: run_spotify.sh + dest: "{{ xdg_bin_home }}/" + rename: run_spotify - src: gpg.conf dest: ~/.gnupg/ - autostart.sh diff --git a/keyboard/sxhkd/sxhkdrc b/keyboard/sxhkd/sxhkdrc index 7c66a0a0..40b44a44 100755 --- a/keyboard/sxhkd/sxhkdrc +++ b/keyboard/sxhkd/sxhkdrc @@ -16,7 +16,7 @@ hyper + shift + t focus_or_run alacritty hyper + u - focus_or_run spotify + focus_or_run run_spotify spotify hyper + s focus_or_run emacs diff --git a/wm/bspwm/bspwmrc b/wm/bspwm/bspwmrc index 694ac058..f56d3a5d 100755 --- a/wm/bspwm/bspwmrc +++ b/wm/bspwm/bspwmrc @@ -28,6 +28,11 @@ bspc rule -a Emacs desktop='^4' state=fullscreen follow=on bspc rule -a Chromium desktop='^6' bspc rule -a TmuxAlacritty desktop='^5' follow=on +# This won't work - see: +# https://github.com/baskerville/bspwm/issues/291#issuecomment-145329416 +bspc rule -a spotify desktop='^7' +# Check base/arch/run_spotify.sh for a workaround + _run_if_present () { case $1 in "/"*) script="$1" ;;