Comments (2)
Node selectors do not behave differently.
.local.floating
is not a valid node selector, as it is missing a node descriptor; it is just a list of node modifiers.
The -n
/-d
/-m
options for the query -N
/query -D
/query -M
commands will accept either a node/desktop/monitor selector, or a list of node/desktop/monitor modifiers. If you specify a selector, it will constrain result the only the node/desktop/monitor specified by that selector; if you just specify a modifier, it will constrain results to any node/desktop/monitor that matches those modifiers.
A node selector will only specify one node, with bspc query -N -n .local.floating
, you are getting the IDs of all the nodes that match those modifiers.
In fact, your bspc node -f $(bspc query -N -n .local.floating)
command will have a few problems if there are more than one match or no matches.
If you use an actual node selector, it will work with node
too; for example, you can use the any
node descriptor to get the "first" node that matches the given modifiers (the first node that would show up in the ouptut of bspc query -N
):
bspc node any.floating.local -f
# or: bspc node -f any.floating.local
Note that, when you use a selector for node -f
, you almost always want to specify .!hidden
otherwise, if there is a floating node in the focused desktop, that is hidden, and happens to be the "first" .local.floating
node, your command will fail because hidden nodes are not focusable, even though there is another focusable node that matches those modifiers.
Also note, that if you are writing a hotkey to focus a floating window, it is better to use next
or prev
instead of any
, so that if you press the binding multiple times, you will focus another floating window instead of the same one again. (next
focuses the "first" node that matches the given modifiers, starting from after the focused node, unlike any
that always starts from the root node of the first non-free desktop; prev
is similar, but matches the first node looking going backwards starting from the focused node).
Example sxhkd
hotkeys:
# focus or cycle floating windows
super + {_,shift + }g
bspc node '{next,prev}.!hidden.local.floating' -f
# focus or cycle tiled (or pseudo_tiled) windows
super + {_,shift + }c
bspc node '{next,prev}.!hidden.local.!floating.!fullscreen.window' -f
Perhaps you were thinking .local.floating
was a node selector because the manual says that the -n
option of the query
commands accepts node selectors; that was a documentation bug that has since been fixed on the git repository, now the documentation says that -n
accepts either a node selector (NODE_SEL
) or a list of node modifiers (NODE_MODIFIERS
).
from bspwm.
Oh now i get it, thank you for this explanation.
from bspwm.
Related Issues (20)
- inconsistent focus when opening with qutebrowser HOT 4
- Bump to the latest version
- BSPWM freezes after being afk for around 20-30 minutes HOT 2
- chromium ui breaks while opening booksmarks popup HOT 3
- ghost windows caused by picom
- My bspwm takes like a second or two to respond to every keybinding followed by the modkey. HOT 8
- How to use multiple hotkeys for the pointer_modifier?
- Cannot open tmuxifier on bspwm config reload
- Window coordinates are out-of-sync after config event
- Mouse input freezes on games like minecraft
- Desktop Assignment Swaps Unexpectedly in Dual Monitor Setup HOT 19
- Spawning a node on a certain desktop HOT 4
- [Kinda Bug?] No "node_transfer" events before or after a "desktop_remove" event
- Rules for Floating Windows not setting correctly for multi-monitor setup
- BSPWM and XFCE4 not agreeing on workspaces HOT 1
- Floating windows that meant to be moved around with their title bars move on focused LMB
- Changing border of floating window breaks it HOT 1
- Segfault in `_apply_name` because xcb's strings aren't null-terminated
- Marble-qt windowing issue & `external_rules_command` HOT 1
- xfce4-panel appears behind the bspwm windows.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bspwm.