Closed ezalenski closed 2 years ago
Maybe my understand of monitors within bspwm is incorrect, but it seems like the two monitors are considered to be linked in some way by bspwm.
Your commands are just wrong.
The optional argument for -M
(or --monitors
) changes the reference monitors for the selectors/modifiers specified by the -m
/-d
/-n
(--monitor
/--desktop
/--node
) options; the focused monitor is used as the default reference monitor if the optional argument is omitted.
(.local
in desktop selectors, and next
/prev
/west
/north
/south
/east
in monitor selectors are affected by which monitor is the reference monitor for example.)
$ bspc query -M ^1
$ bspc query -M ^2
$ bspc query -M
Those command query all the monitors without any filter.
In the first two command, you change the reference which doesn't do much.
bspc query -M ^2
could be used as a "print the id of all the monitors, but only if there are two or more monitors, otherwise don't print anything" I guess. (since ^2
wouldn't match anything if there is only one desktop, and if the reference selector doesn't match anything, the query will fail no matter what.)
But bspc query -M ^1
is basically the same as bspc query -M
with extra steps since there will always be at least one monitor.
$ bspc query -M DP-1.1
$ bspc query --monitor DP-1.1
$ bspc query --monitors DP-1.1
DP-1.1
contains .
which is a special character. As the manual says, you should prefix it with a %
to make it a valid selector (%DP-1.1
)
SELECTORS [...] The following characters cannot be used in monitor or desktop names: #, :, ..
The special selector %\<name> can be used to select a monitor or a desktop with an invalid name.
$ bspc query --monitor DP-1.1
This command would be wrong even if the selector was valid because you didn't specify any command (
-N
,-D
,-M
,-T
, or any of their long option equivalent):
bash-5.1$ bspc query -m focused
query: No command given.
Only options (-n
, -d
, -m
, --names
, ...) are *optional*, not commands:
Query General Syntax query COMMANDS [OPTIONS]
I'd be happy to even implement the fix if needed, but I just wanted to verify if my understanding is correct and that this is a bug around multiplexing/daisy chaining
I honestly don't understand what you even mean with "a bug around multiplexing/daisy chaining", but I think it is working fine.
If you want to get the monitor ID of the second monitor, use the "query monitors" command (query -M
) using ^2
as the monitor selector (-m ^2
):
bspc query -M -m '^2'
I mean I did say I was wanting to check my understand and I'm glad it seems that simple. I do remember trying to use -m but it might not have been with ^1 or ^2. I'll try it out and report back later today or tomorrow morning
Alright, I tried it out and it does work as intended. Thanks for helping me RTFM. I will say the query documentation is a little confusing as
Query
General Syntax
query COMMANDS [OPTIONS]
Commands
The optional selectors are references.
...
-M, --monitors [MONITOR_SEL]
List the IDs (or names) of the matching monitors.
Reads like bspc query -M ^1
should work, but that's just a minor issue. Thanks again.
Maybe my understand of monitors within bspwm is incorrect, but it seems like the two monitors are considered to be linked in some way by bspwm.
I was trying to differentiate between the two monitors
And it seems like they are linked somehow by bspwm?
Some other symptoms I've found is that I cannot query the monitors by name:
I'd be happy to even implement the fix if needed, but I just wanted to verify if my understanding is correct and that this is a bug around multiplexing/daisy chaining