How does bspc rule work

bspc rule -a google-chrome-unstable private=on dekstop=II
bspc rule -a google-chrome-stable private=on dekstop=II
bspc rule -a google-chrome-dev private=on dekstop=II
bspc rule -a android-studio private=on dekstop=8 state=floating center=true
bspc rule -a chromium private=on
bspc rule -a firefox private=on
bspc rule -a midori private=on
bspc rule -a gnome-pie border=off manage=off
bspc rule -a wpa_gui state=pseudo_tiled
bspc rule -a libreoffice state=tiled
bspc rule -a '*:libreofficedev' state=tiled
bspc rule -a '*:soffice' state=tiled
bspc rule -a steam desktop=7

I have a bunch of this rules I set following existing example, but none of them actually work like always opening steam on desktop 7

1 Like

https://manpages.debian.org/testing/bspwm/bspc.1.en.html

Usually if a rule doesn’t work, it is because the window doesn’t match the pattern. In this case your pattern is steam. You can use xprop to check a suitable pattern. Or, you can use bspwm-ruler to automatically generate a rule with the right pattern.

Other reasons it might not work:

  • some windows start with one name and class, and then change to another immediately. For example, libreoffice isn’t matched by Libreoffice pattern even though that’s what xprop shows. It is instead matched by ‘*:soffice’.
  • is your desktop really named 7? Or perhaps VII?
3 Likes

At least 5 years ago your pattern would have been correct. So I suspect it might be the wrong desktop name that is getting in the way.

Also Steam might work as pattern.

Maybe try " bspc rule -a Steam desktop=VII "

1 Like

@kuntau bspc query -D --names will list the desktops by name, to ensure correct selection.

I like this method, as it walks through all the options.

Using bspwm-ruler set the rule:
bspc rule -a Steam state=floating manage=on layer=normal desktop=0x01200014 follow=on

I had to edit the desktop ID to the desktop name to get persistence. So my final functioning rule was:
bspc rule -a Steam state=floating manage=on layer=normal desktop= follow=on

*don’t mind the square, I use font icons for desktop names.

2 Likes

Oh… so my desktop name are wrong all this time lol

Desktop 

This is default manjaro-bspwm installation.

I use this rule and set mine on desktop 7, it still open on what ever dekstop I’m on

You’re totally right, I was on desktop 7 when testing :blush:

There’s a few links on reddit, not much elsewhere, about steam with rules. This will require more reading and testing.

Never use bspwm . Look interesting :+1: VM time I think …

1 Like

Spent a little time looking at this today. I’m not sure if the main window will cooperate, which is a bummer. See here: Feature Request: Let Steam client windows be managed by the window manager · Issue #1040 · ValveSoftware/steam-for-linux · GitHub

I did have success with launching the chat and promotion windows on the correct desktop but, the main window wouldn’t cooperate.

bspc rule -a Steam state=floating manage=on layer=normal desktop=^7 follow=off

I had to swap out the font icon desktop names to generic numbers though. The default names can be changed in /usr/bin/workspaces_multimonitor.

Wanted to drop this link as well as it seems launching games individually may be something that works around the library window? (see last two comments)