Snapshoting a workspace in WM: layout and programs which are opened

223 Views Asked by At

I was wondering if it was possible to snapshot a workspace, i.e. save state not only of the layout but also of the windows which were opened.

  • Why do I need this?
  • Because I switch between different workflows. I may program for a while and then I may want to switch to a different activity, then switch back again to programming. On the average I have up to 7 windows on my workspace. I need to save RAM for (freeze and lag)-less workflow. I want to be able to close workspace 1, switch to another - workspace 2, then restore workspace 1 from the point when I had left it.

This should be totally manual, so I still can work on multiple workspaces. I have to control whether I want to close and restore previous workspace session. When I restore the workspace, it should be just like I had left it, given that I hadn't changed the files or deleted programs that were opened.

  1. Can this be done at all or at least some part of it with any WM?
  2. Is this a stupid idea?
  3. Does not running a graphical UI saves me RAM (how much)? - so maybe the windows should not be killed when closed, but rather run in the background (daemon), like in Tmux.

Earlier I tried i3 and Awesome(briefly). The biggest struggle was the toolbar, manual set up of volume, brightness, language switching control and proper fonts (on Arch Linux), I didn't fully succeed in setting my environment(I skimmed through wikis) so I fled.

Is it easier to set up Awesome in this respect? Currently I use Cinnamon+Debian, and I'm almost happy with it. I'd like to use touchpad less and therefore ask for advice. I'll try to set WM up on VM first for painless transition.

1

There are 1 best solutions below

0
On

I've done something similar before in i3-wm. I created a keybind to a bash script in my path that opens four terminator terminals on an empty screen. It uses the i3 command i3-msg to tell the window manager how the behavior of the next window opened will change. Here is my script:

terminator          # opens terminal, change to the terminal that you use
i3-msg split h      # tells i3 that the next window should split screen vertically
terminator          # opens terminal
i3-msg split v      # tells i3 that next window should split current one horizontally
terminator          # opens terminal
i3-msg focus left   # Changes selected window to the left one
i3-msg split v      # tells i3 that the next window should split screen vertically
terminator

You should be able to take the i3-msg command and use it to control how windows of your applications open.

This is a quick, hacky solution, but it does work.

I hope this was able to help!

phylo