[i34wm] i3monocle [request] #225
Labels
No labels
Arch PKGBUILD
bug
build
commandline
duplicate
enhancement
font
good first issue
help wanted
implemented
is-it-really-a-bug?
necromancy
not-reproducable
question
reproducable
rofi
solved?
stalled
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
bud/i3ass#225
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I want to be able to have a hotkey shortcut to toggle a monocle mode, hiding all non-focused i3frya containers. This way, I can have a alternative to fullscreen mode, but keep my status bar (currently polybar) visible .
Ex. if i3fyra family is AC/BD (default) and Container C is focused: hide containers A, B and D.
@budRich Is this attainable inside i3fyra itself (e.g.
i3monocleori3fyra --mono?Tried testing, but the container hiding doesn't work properly and below script keeps giving inconsistent results, what gives?
P.S. notify-send returns:
Interesting. I remember vaguely, i had similar ideas when i initially wrote the --hide functionality, and that i then made sure that it would work properly to multihide containers, just for this purpose. But i never really used it myself, and it is very possible that the multihide functionality has become broken.
I will look into this. i have a feeling solving this issue will solve other known or unkown issues as well.
I do like the
--monooption name....
i did some quick testing in the terminal. and something weird is going on. when i just do i3list, it spits out the array and i can see that value of i3list[AFS]=A , but when i eval $(i3list), and do echo ${i3list[AFS]} , it prints container ID of active container. and does the same thing for AFO... hmmmmmaha, first declare -A i3list .
this actually works fine for me, at least from a terminal. i3fyra --hide ADB , hides all but C container, and hide BD as a family.
I will test with a script also
^ this will, as you say print i3fyra --hide DDA , since there is two AFT
Hiding seem to work fine and reliable for me, can you reproduce a scenario where you get inconsistent results?
try this:
above script will either hide all other containers, or if there is only one container, same script will show all other containers. maybe it is even possible to fine tune it further, so that if f.i. aCd are visible, and B is already hidden when we trigger mono. if we trigger mono again, it should not bring back B, i think that is possible too, with the memory variables in i3list..
ok, i add
--monoto i3fyra , @1ntronaut see if you can break it.#2279c7c
i did some manipulation of how the "family memory" is stored, so it now changes when we hide a single container (previously it only changed when a whole family was hidden). This make it somewhat reliable to toggle --mono back and forth. But it may or may not break other things, i have tried to break it but it seems to work..
i knew there was something to be found. There was a bug in how i3fyra variables (split memory and such) are stored, which sometimes lead to duplicate variables being created. I patched it, and i bet this was a cause of other known and unkown issues.
Haven't had time to test the new code yet, but thank you @budRich. I have the suspicion this could also fix windows returning to their assigned i3fyra containers, even when they have moved around.
So, for example: I have instance 'mainterm' assigned to tile in container A, but when I move the entire container A to the location of C and vice versa (by pressing: $mod+shift+K and then $mod+shift+J), such that 'mainterm' is now in container C. If I now manually float 'mainterm' and tile it again, it will move to container C, in stead of container A (as is assigned and handled by i3king)... But I'll test this usecase for sure, when I find the time..
Additionally, I realize, now that you mentioned it, that this is indeed the behaviour I have come across when using i3fyra, where I have to manually rearrange/hide a container again in one (or two) families.. It was never too much effort or significant in breaking my workflow window management, but I do recognize exactly what you mean.
Dear Bud, it's me again...
--monoworks like a charmPlease consider short optino
i3fyra -Mfor toggling monocle modeOtheriwse, close issue, thank you so much!
Yeah, i have used this feature myself quite a bit more than i expected to do, and have not noticed any issues, i will try to wrap up a new release this weekend and will include short opt
-MBud, I was typing a big edit, where I found some issues w/ --mono, but because of you replying, the page updated and now my draft post is gone xd
Hiya @budRich ,
Installed freshly pulled source from git.
Monocle mode works like a charm, including the short option -M, none of the earlier bugs I found apply anymore..
Only one tiny thing remains:
i3fyra --monofrom a floating container, it will hide ALL regular (tiled) containers on the i3fyra workspace. Togglingi3fyra --monoagain will SHOW them all in exactly the same layout/order as they were beforeotherwise, consider
i3monoclea successAh, don't think i ever considered floating windows. It doesn't work properly at all here. When I toggle floating just as you describe it hides all tiled windows, but when i toggle back it bring back the windows, but for me the layout is all messed up.
Not sure exectly how i would like it to work, it might sound obvious for monocle on a floating window to hide all other windows and tile the floating window to make it monocled on the workspace. but, now where does this window belong if we toggle --mono back? either make it tabbed/tiled in the last focused fyra container. Or make the window floating again and bring back the old windows. yeah, i think that is what should happen i will experiment with this a bit.
I found another bug! Apparently when multiple containers spanning multiple families where shown, i3fyra created the main layout container multiple times, i think i have fixed that now. Regarding floating -> monocle i desided on this:
if active window is floating i think what we want is
for it to be tiled in a container and hide all other
containers. if no container exist, we toggle floating
else we send it to first found container (prio VIS)
and hide all others.
it gets a bit weird when we toggle back from monocled
with such a window, in one way it would make sense
to make it floating again, on the other hand, it might
feel awkward if user has forgotten that it was once
floating->monocled (time can in some cases be days or weeks...)
so i think we should just let it be tiled, and show the other
containers. if user wants it floating again they manually toggle float
one could argue that we should also have the user manually tile window
before entering monocle, but this will make it un-intuitive, since no action
except error message (that is hard to find when triggered with keybinding) will be shown in such casem with this approach something will most likely happen every time --mono is used (on a i3fyra workspace).
just realized that maybe if we are not on i3fyra workspace we could just toggle normal full screen?