bspwm
bspwm copied to clipboard
Fullscreen and other windows
When I fullscreen a window, what as a user I would expect is that this window is maximized and everything else stays the same. In reality (correct me if I m wrong) what happens is that every window is fullscreen bellow the chosen one (or maybe it just gets removed temporarely from the tree?). What exactly happens is irrelevant but point is, that me pressing fullscreen triggers resize events on windows bellow. This might be no problem for most of the people, but as I work with a project that has javascript that refreshes webpage when window gets above/bellow width threshold, its gets very annoying. Even if this didnt happen, resize a modern webpage is often resource heavy and useless in this case since we dont even see it. Recently I watched some youtuber's screencast, he had transparent terminal and I saw window bellow so i think they all sit bellow maximized.
Its minor issue, but I would love to see behavior like this : press fullscreen -> window gets on "separate ws" -> empty node gets pushed on its place without any resizes....when i go out of fullscreen it all reverses. I can imagine scripting this with bspc but I m not really sure how would this work when i maximize program by its "fullscreen handle" outside of WM's keybind.
I am interested in this. And maybe also a possibility of pseudo fullscreen, where windows would fullscreen to their frame and not the entire screen.
I am also very interested in the pseudo fullscreen, I've seen a question where someone else was having it as an undesired effect of a WM they were making (#924) so it is hopefully possible.
you can do something like
node="${1:-focused}"
bspc node "${node}.fullscreen" -t \~ -n @brother ||
bspc node "$node" -i -t fullscreen
to avoid resizing other nodes when switching in and out of fullscreen. just a POC, obviously you'd want to make this a little more foolproof.
I can imagine scripting this with bspc but I m not really sure how would this work when i maximize program by its "fullscreen handle" outside of WM's keybind.
i guess i kind of missed that part. i think you can do it without effecting much else if you change things here:
https://github.com/baskerville/bspwm/blob/e22d0fad23e0e85b401be69f2360a1c3a0767921/src/tree.c#L146
if (d->layout == LAYOUT_MONOCLE
|| (n->first_child->hidden || (n->first_child->vacant && n->first_child->client->state != STATE_FULLSCREEN))
|| (n->second_child->hidden || (n->second_child->vacant && n->second_child->client->state != STATE_FULLSCREEN))) {
I was having crashes with @ortango 's solution, so apparently n->first_child->client
or n->second_child->client
may be null. I honestly didn't dig deeper but hopefully this works better:
if (d->layout == LAYOUT_MONOCLE
|| (n->first_child->vacant && (n->first_child->client == NULL || !IS_FULLSCREEN(n->first_child->client)))
|| (n->second_child->vacant && (n->second_child->client == NULL || !IS_FULLSCREEN(n->second_child->client)))) {