Hi,
as of bspwm 1088, I've got the problem that commands like bspc window -t floating put the window into the given state, but the state isn't toggled anymore. I. e. in this example, the window is sent into the floating state, but can't be brought back into tiling state by executing this command again.
Toggling seems to be only dead for states, for flags, it still works…
As it is currently implemented, -t does not toggle, but _sets_ a state, so this is the expected behavior. Maybe last_state can be used to enable toggling when handling the message, but I also think that issue #328 should be taken care of as well.
Oh thanks, I see, but why should one renounce the toggle feature for states anyway deliberately? It's imho damn handy… Also, why is then the toggle feature still alive for flags?
Maybe last_state can be used to enable toggling when handling the message
I've been reading the manpage, there, I can't find anything about 'last_state'. Where did you get that from?
Maybe last_state can be used to enable toggling when handling the message
I've been reading the manpage, there, I can't find anything about 'last_state'. Where did you get that from?
It's not something exposed to the user, but an implementation detail. Internally, each node remembers its last (previous) state, i.e. whether it was tiled, pseudo tiled, floating, or fullscreen. However, it is scarcely used; even its use in toggling has been removed as I mentioned in issue #328.
I began using bspwm yesterday, so I do not know whether toggling for states via bspc window -t was enabled previously. Toggling flags is very trivial, on the other hand.
I began using bspwm yesterday, so I do not know whether toggling for states via
bspc window -twas enabled previously.
It was since ever, that's where the t in -t comes from. ;)
See also articels like https://wiki.archlinux.org/index.php/Bspwm/Example_configurations , example "Toggle floating/fullscreen".
Okay; in that case, have a look at issue #310. It includes a workaround which enables toggling.
Thanks for the link! But as you said, it's just a workaround, and I still find it 1.) very confusing to have -t for setting and not toggling and 2.) to have to use more shell now to compensate a feature loss.
I wholeheartedly agree with you; not to mention that the "workaround" proposed there also suffers from what I pointed out in #328.
Long story short: the "toggling" is not toggling anymore, but rather switching between tiled and whatever is specified. So, if you have a floating client which you want to temporarily fullscreen, you will fullscreen it OK, but it will tile (instead of float) when you toggle fullscreen off. This is also what happens when the EWMH toggling hints are used (which is what issue #328 mentions, along with the code internally not remembering previous layers).
@cju
-t is the short flag for --state, not --toggle and -s is already taken.I still assume that "toggling between the last two" states is OK to be implemented, maybe as an additional command.
First of all, thanks for your answers!
-t is the short flag for --state, not --toggle
Yeah, now, but in the past, it has been for toggling, so that's where my confusion came from.
Well, states behave differently (do you understand the difference between states and flags?)
I do, but as d125q said, there's nothing about the idea of states that would collide with the idea of toggling between the latest two of them.
Edit: Anyway, since this is not a bug, and I only opened this issue, cause I thought it'd be one, I allowed myself to close it.
@cju: Can't this stay open as a feature request for @baskerville to consider? I think quite a few users would agree with this -- wanting to temporarily toggle states is something I'd assume that is regularly used.
Well, I think that'd be another cup of tea, because my intention behind reporting this supposed issue was to find out where the old behaviour of that quasi-toggling of window states has gone. This issue is imho hereby resolved, we now know what's going on an why.
Having a real window state toggling function is something I'd also appreciate, but it's another matter, as that would be not equivalent to restoring the old quasi-toggling behaviour.
+1, I think it can be pretty easily configured from bash script. But I too liked the previous way of handling things. maybe add --toggle?
@Swoorup
super + {t,shift + t,s,f}
bspc node -t '~{tiled,pseudo_tiled,floating,fullscreen}'
@baskerville that works wonder. Many thanks
I prefer to have a single shortcut for toggling between tiled and floating, regardless of the window's initial state, so I use the following in sxhkdrc (with bash as the shell):
super + f
if [ -z "$(bspc query -N -n focused.floating)" ]; then \
bspc node focused -t floating; \
else \
bspc node focused -t tiled; \
fi
Most helpful comment
I prefer to have a single shortcut for toggling between tiled and floating, regardless of the window's initial state, so I use the following in sxhkdrc (with bash as the shell):