Reputation: 528
I am trying to have desktops 1-4 on my laptop screen and 5-8 on my second screen.
Super 1-4 works fine on my laptop. But when I press Super 5-8, the focus stays on desktop 4, not switching to my 2nd screen. When I move my mouse pointer to the second screen I can open apps there, and then Super 1-4 switch between desktops 5-8.
Somehow the focus switch does not work to my other monitor.
bspwmrc:
#! /bin/bash
pgrep -x sxhkd >/dev/null || sxhkd &
... other startup commands
start_from=1
monitors_connected=$(bspc query -M | wc -l)
per_monitor=$(( 8 / monitors_connected ))
for monitor in $(bspc query -M); do
bspc monitor $monitor -d $(seq $start_from $(( start_from + per_monitor - 1)))
start_from=$(( start_from + per_monitor ))
done
(I found this here: bspwm workspaces not working after activating other monitor)
sxhkdrc:
super + {_,shift + }{1-8}
bspc {desktop --focus,node --to-desktop} 'focused:^{1-8}'
When I open a terminal on my second screen and type the command bspc desktop --focus 2
, then the focus switches nicely to desktop 2 on my laptop screen.
UPDATE: I think I can narrow this issue down to: Why do Super 5-8 not work? And why are Super 1-4 on my second monitor going to desktops 5-8?
Upvotes: 2
Views: 1458
Reputation: 528
In the meantime I solved it. I'll leave the solution here for others having similar issues.
I removed the word 'focused' from the command. That was basically it. I also split the line into two separated lines for more flexibility.
super + {1-8}
bspc desktop --focus ^{1-8}
super + shift + {1-8}
bspc node --to-desktop} ^{1-8} --focus
Upvotes: 2