Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabmode is great, but when I quit tabmode, I didn't restore the original layout. #6

Closed
Leiyi548 opened this issue Aug 1, 2022 · 5 comments · Fixed by #8
Closed
Labels
enhancement New feature or request

Comments

@Leiyi548
Copy link

Leiyi548 commented Aug 1, 2022

Thank you,creat a good script.

Before:
image
After:
image

I didn't restore the original layout.

@BiagioFesta
Copy link
Owner

Thank you for your feedback.

I agree, that might be annoying.
I was already planning to put some effort on it, see if I can find a good solution for that.

A few days ago, I have tried this: https://i3wm.org/docs/layout-saving.html; but I didn't go into it. Maybe I could leverage it.

@BiagioFesta BiagioFesta added the enhancement New feature or request label Aug 1, 2022
@BiagioFesta
Copy link
Owner

I am working on an experimental feature for saving and restore layouts: #7

My plan is to integrate this into the tabmode command.

@BiagioFesta BiagioFesta linked a pull request Aug 13, 2022 that will close this issue
@BiagioFesta
Copy link
Owner

i3-autolayout now supports command save-layout and restore-layout for store and load a workspace layout.

Moreover, tabmode has been now integrated with save/restore layout.

The default behavior of tabmode is unchanged. However, the option -f allows specifying a filename where to save and load the layout.

I would expect something like the following in the i3 config:

bindsym $mod+w exec i3-autolayout tabmode -f /tmp/i3-tabmode.save 

tabmode automatically works in "toggle" mode.


The logic for saving and restoring a layout is a bit complex (because of the nature of i3). So I expect some minor bugs in the layout restoration, that is why I am planning to release a "beta" release (which will contain all those new features).

I would really appreciate if you can provide feedback (enhancements). Please also report bugs (I am sure there are some at this development stage), so I can try to correct them.

Please let me know if you appreciate this feature and all feedback you can provide. Thank you.

@BiagioFesta
Copy link
Owner

@reeluff
Copy link

reeluff commented Nov 13, 2023

This feature makes i3 nearly work right for me - excellent thankyou - basically all i want is each workspace in split mode to be an interactive overview that i can tab/ maximise into everything on the whole workspace in a simple clean way.

2 things i have noticed that can be improved --

1-- if on multiple workspaces, the autolayout will be restored if leave to create/ view another workspace if you leave previous in split view, however if a new workspace is created/viewed and leave the current one in tab view - when return back to the older workspace it will be stuck in tab view with no way to get back to split view.

2-- flicking in and out of tab/ split view toggle - when moving from tab view back to split the selected window does not stick - it seems to jump back to the window that was selected when first leaving split view - should always remain on the chosen window when leaving both view modes.

-- out of interest, this function is not in the original i3 is it? As i can see, the i3 node/window/leaf thing does not quite make sense to me when it comes to splitting windows in a different direction and then creating tabs from the workspace. If a workspace is not split, and all new windows are tiled in the same direction then all the windows will be tabbed together. As soon as you want to make a new window go in the other direction - as far as i can see the only way to do that is by splitting a window - then once this split is created any tab view is split up too, and gets a bit messy when trying to navigate up through tab parents and children. All i want is everything in a workspace layout to toggle in/out a simple clean single line tab view and then back again to split view, your code is the only way to get this am i correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants