Closed levouh closed 3 years ago
I use this hotkey (super + g
, but super + shift + g
is also available to go in the reverse order) to cycle between floating windows:
# Focus a floating window / Cycle floating windows.
super + {_,shift + }g
bspc node 'focused.floating#{next,prev}.local.!hidden.floating' -f \
|| bspc node 'last.local.!focused.!hidden.floating' -f \
|| bspc node 'any.local.!focused.!hidden.floating' -f
I found older issues that note things like
adaptative_raise
and potentiallyraise_on_focus
but looking atsettings.c
and trying these withbspc config ...
, these seemingly don't exist anymore.
If you want to have floating windows raise when they are focused by the mouse pointer (focus_follows_pointer
), you can use this script (make it run in the background):
#!/bin/bash
while bspc subscribe node_focus -c 1 > /dev/null; do
bspc node -f
done
Is there a good way to raise a floating window when two exist, and the focused one is below the other for one reason or another?
What else, besides focus_follows_pointer
, could be the reason for that?
Not sure, that's why I've posted here.
The general case to recreate, at least as far as I've seen, is having a floating window focused and another unmapped. When the unmapped window is mapped again, I have a script that then calls bspc node <id> -f
on it. The recently mapped window is clearly focused based on the drawn border, but the previous focused window is still drawn on top. Note that I also have focus_follows_pointer
set to false
, however if I am having a script control the focusing, etc. (I've also tested manually calling bspc
on the window ID) I don't see how this applies.
Should focused floating windows always be on top of unfocused ones?
The general case to recreate, at least as far as I've seen, is having a floating window focused and another unmapped. When the unmapped window is mapped again, I have a script that then calls bspc node
-f on it.
I was not able to reproduce this.
I tried:
node -f
on it:
bspc rule -a \* -o state=floating follow=off focus=off; wid=$(xdo id); xdo hide "$wid"; xdo show "$wid"; bspc node "$wid" -f
node -f
was run before bspwm
had time to manage the window.And:
bspwm
again node -f
on it:
bspc rule -a \* -o state=floating follow=off focus=off; wid=$(xdo id); xdo hide "$wid"; xdo show "$wid"; bspc subscribe node_add -c 1; bspc node "$wid" -f
Anyway, if this is what you mean, you should really be using node -g hidden=off
and node -g hidden=on
instead of xdo hide
and xdo show
if you plan on hiding floating windows.
Do you mean something else with "unmapped" and "mapped again"? Can you give reproduction steps?
Should focused floating windows always be on top of unfocused ones?
If you are having this problem only with one specific program's windows, that program could be setting its windows' layer to above
.
It was an issue with the above
state of the various windows, thanks for the help @emanuele6.
Is there a good way to raise a floating window when two exist, and the focused one is below the other for one reason or another? This doesn't need to happen automatically as I can trigger it via other means manually, but things like:
don't seem to work, nor does
bspc
provide a way to do this (beyond layers, but if the two windows are in the same layer this doesn't help). I've also tried simple things like:but focusing is not synonymous with raising. I found older issues that note things like
adaptative_raise
and potentiallyraise_on_focus
but looking atsettings.c
and trying these withbspc config ...
, these seemingly don't exist anymore.