Prevent windows (e.g. games) from being pulled out of fullscreen when a new window is opened on the same workspace
Prevent windows (e.g. games) from being pulled out of fullscreen when a new window is opened on the same workspace
Hello everyone!
I would like certain windows to remain in full screen even if another tiled/floating window is opened on the same workspace. I would also like the tiled/floating windows to remain above the full screen window so that they don't disappear if I click on the full screen window.
The primary use case for this is games such as Eve Online, where I use a number of external tools which may or may not spawn new windows over the game window (e.g. the Rift Intel tool, which spawns a new small floating window whenever someone writes in one of the intel channels you set Rift to monitor). I dont want it to exit full screen mode. If a tiled or floating window is opened on the same window then Eve also goes into tiled mode.
Reading up a little about this I came across the concept of layers in bspwm, but I'm not entirely sure if they fit for this use case. Here's an example of what I don't want to happen:
(The Hostile Reported popup window is from Rift and spawns wherever focus is)
Normally I have it be entirely fullscreen. I'd like to be able to interact with these and other popup windows in tiled/floating mode without pulling Eve out of fullscreen.
How can I begin to work on this? Of course if you would like more info please ask and I'll provide it.
Thanks in advance!
[SOLUTION (I think)] I had to add this rule for my Eve client:
bspc rule -a "steam_app_8500" state=fullscreen layer=below border=off focus=on
but also had to add this rule for the Rift Intel tool:
bspc rule -a "dev-nohus-rift-MainKt" state=floating layer=above
I guess this is the way to do it for any set of programs where you want one to keep its fullscreen status but have others above it
NOTE: This also applied the same behaviour to the eve launcher since the way steam proton works both the launcher and the clients have the same WM_CLASS. If anyone knows any way to distinguish them in bspwm please let me know. Here is what I get for each when running xprop:
$ xprop | grep -E 'CLASS|NAME'
_NET_WM_NAME(UTF8_STRING) = "EVE Launcher" WM_ICON_NAME(STRING) = "EVE Launcher" WM_NAME(STRING) = "EVE Launcher" WM_LOCALE_NAME(STRING) = "en_US.UTF-8" WM_CLASS(STRING) = "steam_app_8500", "steam_app_8500"
# Click on launcher
$ xprop | grep -E 'CLASS|NAME'
_NET_WM_NAME(UTF8_STRING) = "EVE" WM_ICON_NAME(STRING) = "EVE" WM_NAME(STRING) = "EVE" WM_LOCALE_NAME(STRING) = "en_US.UTF-8" WM_CLASS(STRING) = "steam_app_8500", "steam_app_8500"
# Click on client
Ive tried rewriting the rule as such:
bspc rule -a "steam_app_8500:steam_app_8500:EVE" state=fullscreen layer=below
and also adding a rule for the launcher specifically (before the client rule):
bspc rule -a "steam_app_8500:steam_app_8500:EVE Launcher" state=tiled layer=normal
But the launcher still opens in fullscreen. The client however seems to be fine - it opens in fullscreen on the 'below' layer so when a new window is opened on the same workspace it isn't forced into tiled mode.