Closed ThibaudDauce closed 4 years ago
alt + {_,shift + } Tab bspc node -f {next,prev}.local
I have a command to focus the next/previous window in a desktop:
Here is where you are wrong: next
and prev
can select any bspwm
node, not just windows (changed in bspwm 0.9.10
).
Those are not "shadow windows", those are non-leaf bspwm
nodes.
focused
can select any bspwm
node as long as it is focused (it has always behaved like this, this wasn't changed in the last update).
bspc query -N -n focused
, when the focused bspwm
node is a not a window node, will return the node id of the focused node. These ids are not X Window ids; xprop -id <id>
gives you the BadWindow
error because that id not the id of an X Window, it's just an internal ID of bspwm
...
You can't get a title from that id
with xtitle
for the same reason: that's not the id of an X Window!
Other issue, when using my kill command:
ctrl + {_, shift +} q bspc node -{c,k}
When the focus is on one of the real windows, everything is working (the windows is killed), when the focus is one the shadow window, the two real windows are killed.
That's not an issue: when you "kill" a non-leaf bspwn
node, all of its children bspwn
nodes are killed; when you "close" a non-leaf bspwn
node, all of the windows contained in its children bspwn
nodes are closed.
That is totally intended.
As you can read from the CHANGELOG, if you want to use next.local
and prev.local
to select the "next local non-hidden window" bspwm
node, use the proper (explicit) selector:
alt + {_,shift + } Tab
bspc node -f '{next,prev}.local.!hidden.window'
# ADDITIONAL NOTE: this is a duplicate of #1168, #1171 and #1172.
Also, if you want to get the id of the focused X window, use:
xdo id
(xdo
)~ It currently won't work https://github.com/baskerville/xdo/issues/21pfw
(wmutils/core
) (only one of these that works, use pfw
!)xdotool getactivewindow
(xdotool
)~ It doesn't workDon't use bspc query -N -n focused
: it isn't meant to be used for that.
Hi,
Thanks a lot for the long explanation.
I used xtitle
, xprop
and bspc query -N -n focused
to try to debug the situation. My real problem was with the switching and the !hidden.window
fixed the problem.
Sorry about the duplicate, I made a few searches on the issues but didn't find these ones…
I should have read the changelog (but I wasn't sure it was working correctly before and didn't see a particular update with Pacman recently).
Sorry for the inconvenience.
I have a command to focus the next/previous window in a desktop:
When there is more than two windows, I get a third blank one, when querying I get:
These three commands are working when the focus is on the two real windows:
Other issue, when using my kill command:
When the focus is on one of the real windows, everything is working (the windows is killed), when the focus is one the shadow window, the two real windows are killed.
When there is 3 windows, it seems the shadow window appears between each switch. Real window 1 -> shadow -> Real window 2 -> shadow -> Real window 3 -> shadow -> Real window 1 -> …
Do you have an idea?