I am having some issues in configuring bspwm in multi-monitor setups.
eDP1 is on desktop 1 and monitor HDMI1 is on desktop 5, with the shortcut they would go to desktop 2 and 6 respectively. Obviously, the focus should stay on the desktop that had the focus before the shortcut.bspc node -f next.local, but this works only for the currently selected desktop.As you can see, all my issues are mainly due to the fact that I would like to have a way to "pair" desktops in multiple monitors, because I believe it is a better workflow overall. But, I don't know if this is possible at all, so I am trying to find some ways (namely, some sxhkd shortcuts) to work around the issue.
A solution could be to have an option to force only one desktop that spans multiple monitors, but I don't see it as the best way because it makes more sense to keep two (or more) window trees for two (or more) desktops.
What is your opinion on this?
-a|--activate..active instead of .local.For 1.: -a Activates the selected or given node. How would that help? Also, what is the difference between activated and focused?
What I'm trying to do right now is to implement a shortcut that does the following (e.g. for next):
bspc desktop -f next (which moves the focused desktop of the focused monitor to the next on the same monitor)bspc monitor -f next (which moves the focus to the next monitor)bspc desktop -f next(which moves the desktop on the next monitor)bspc monitor -f prev (which moves the focus to the previous monitor)But it is cumbersome and not the best solution. Also, I don't know why but it doesn't work.
For 2: Thank you, great!
@baskerville I am trying to workaround the issue with a better approach. Right now I would like to select all the unfocused monitors. From man bspc I get the following two information:
Monitor General Syntax
monitor [MONITOR_SEL] COMMANDS
If MONITOR_SEL is omitted, focused is assumed.
Select a monitor.
MONITOR_SEL := [MONITOR_SEL#](DIR|CYCLE_DIR|last|older|newer|focused|primary|^<n>|<monitor_id>|<monitor_name>)[.[!]occupied][.[!]focused]
I am trying to select the unfocused monitor both by using bspc monitor !focused, bspc monitor .!focused or bspc monitor next.!focused, but they don't work. Do you mind telling me where I'm wrong?
The descriptor can only be omitted with the _query_ command: query -M -m '.!focused'.
Ok great. So now to select the unfocused monitor I can type bspc monitorbspc query -M -m '.!focused'`. And this works when I want to add e.g. a desktop by typingbspc monitor bspc query -M -m '.!focused' -a newdesktopname`.
Now, how can I switch to the next desktop in that unfocused monitor? Because if I type bspc monitorbspc query -M -m '.!focused'-f next the desktop is changing but the monitor gains also focus (which I don't want).
I tried to use the following syntax:
ctrl + alt + {Down,Up}
bspc monitor `bspc query -M -m '.!focused'` -f next; \
bspc monitor `bspc query -M -m '.!focused'` -f next
but also this one does not work.
the desktop is changing but the monitor gains also focus (which I don't want).
You can change the focused desktop of an unfocused monitor with
-a|--activate.
@neeasade I don't know hot wo make that work.
If I type bspc monitorbspc query -M -m '.!focused'-a is going to create a new desktop rather than doing what I would like to do.
Here's what you probably want:
super + ctrl + bracket{left,right}
cycle_dir={prev,next}; \
bspc desktop "$\{cycle_dir\}.local" -f; \
for mon_id in $(bspc query -M -m '.!focused'); do \
bspc desktop "$\{mon_id\}:focused#$\{cycle_dir\}.local" -a; \
done
Exactly! Ok now I know what I was doing wrong. I shouldn't have worked around the monitor, but the desktop. Thank you so much!
Most helpful comment
-a|--activate..activeinstead of.local.