baskerville / bspwm

A tiling window manager based on binary space partitioning
BSD 2-Clause "Simplified" License
7.79k stars 414 forks source link

Using window properties #553

Closed gipert closed 4 years ago

gipert commented 8 years ago

Don't know if this is the right place for this...

It's not possible to assign an application to a desktop using its WM_NAME attribute, right? I found my software has an empty WM_CLASS attribute.

Cheers

neeasade commented 7 years ago

using an external rule you could check for any window property and act on that (derive from xprop output of the window ID)

R3load commented 7 years ago

Is it possible to, for example, focus a window by its WM_CLASS or WM_NAME? You can xprop -name <WM_NAME> to get the window's properties but I'm not sure what to look for in the output that could translate into NODE_SEL. Any clues?

msteen commented 7 years ago

@luigipertoldi Here is an example of what @neeasade proposed you should do.

@R3load There are plenty of ways to achieve that. You can use e.g. xdo id -a <WM_NAME> or xdotool search --name <WM_NAME> and then pass it to bspc node --focus <WIN_ID>. A full example would be this:

for wid in $(xdotool search --name chrome); do
  bspc node --focus $wid && break
done