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

ability to save & load sessions #3

Open
sunaku opened this issue Nov 14, 2009 · 12 comments
Open

ability to save & load sessions #3

sunaku opened this issue Nov 14, 2009 · 12 comments
Labels

Comments

@sunaku
Copy link
Owner

sunaku commented Nov 14, 2009

Add the ability to save and load sessions to a YAML file. A "session" action in the wmiirc can be used to script the loading of a default session on startup.

@sunaku
Copy link
Owner Author

sunaku commented Nov 18, 2009

xprop emits a WM_COMMAND(STRING) line that contains the $0 and ARGV used to launch the client. Unfortunately this line only appears for some clients, such as terminal emulators.

@sunaku
Copy link
Owner Author

sunaku commented Apr 10, 2010

A simpler sub-problem is to preserve the arrangement of clients on a view. Once we know how to do this, the next step is to (1) spawn or (2) watch for clients that fit the puzzle and place them in the correct location. The placement may not always be possible either---especially in the managed area---because if not all of the original clients spawn, then some columns may be missing and things won't be exactly as before.

@julienfantin
Copy link

Hi sunaku,
have you made any progress on this yet ?
That's a feature I would really to see available in rumai!

@sunaku
Copy link
Owner Author

sunaku commented May 24, 2010

No, I have not returned to this issue since the last update. I keep my system on all the time, or hibernate it when it needs to power off, so I wasn't really motivated to work on this feature. Patches are welcome. :-)

@julienfantin
Copy link

Well my motivation behind this feature is to expand upon the concept of dynamic tagging already available in wmii, by enabling dynamic sessions saving/loading.
One would be able to load a session with only work related tags, while all personal stuff resides in another session etc, which would make for a more productive experience (at least to me), by clearly separating concerns, sort of like best-practices applied to desktop management :oP

I don't have much experience with wmii's internals since I've been relying on rumai and your wmiirc for as long as I've been using it, so I'm not sure how far off this is from being possible...

Do you reckon that'd be possible with the current state of wmii-hg, and if so do you have any pointers on where to start looking ?

cheers, and keep up the great work !

@sunaku
Copy link
Owner Author

sunaku commented May 26, 2010

Saving and loading the arrangement of clients is certainly possible at present (see http://github.com/sunaku/wmiirc/issues#issue/3/comment/183096). The challenge is figuring out how to bring those clients into existence from scratch (see http://github.com/sunaku/wmiirc/issues#issue/3/comment/76986).

I guess we should take a look at how other WMs solve this problem. I know gnome and xfce have a "save session" option that they present before logging you out.

@ghedamat
Copy link
Contributor

this feature would be great! I'll see if I can help, but I still don't know how :P

@ctx
Copy link

ctx commented Jan 11, 2011

I have some kind of a prototyp in bash.

you need three things for every application:

open one file (in the container of the current tag)
open a session
close a session

when i first started using wmii this rubi thing did not work. Now it works so i probably have to learn some ruby.

Maybe it would be better to use gnome-session, lxsession or xfce4-sessioin but thats less fun.

  • edit -

    It seems that the only work for new X11 sessions. Maybe thats wat you search. But like julienfantin I would like to load/save sessions from/to tags.

@sunaku
Copy link
Owner Author

sunaku commented Jan 12, 2011

@ctx - Your approach seems interesting but I don't yet understand how the three requirements you mentioned would be used to implement session support.

Could you post your bash prototype on GitHub (as a gist maybe)? That would give me a better idea of your approach to implementing this feature. Cheers.

@ctx
Copy link

ctx commented Jan 12, 2011

:) sorry, it's here https://github.com/ctx/wmii-session

@nougad
Copy link
Contributor

nougad commented Feb 17, 2011

@ctx - I just read your project. It was really interesting. I never thought before about session storage stuff. Finally I looked at some gnome session stuff too.

As far as I understand each application need to implement an gnome (and likely xfce and kde do it the same way) interface which is called on session-save. In my opinion this should not be the task of this wmii-config.

Defining a view such as "projectXY - open console, Webbrowser and vi on tag projectXY" would be nice. You could open multiple of this "views" and close them. But you have do define all actions manually. The automatic saving such as gnome-session should in my opinion not be reinvented. A generic session handling would be nice but I don't found a project it or any freedesktop.org draft. After that we could think about the positions of windows etc.

But anyway your prototype is interesting especially for legacy programms which doesn't support any session-save interfaces.

@ctx
Copy link

ctx commented Aug 25, 2011

Hi,

It is actually much easier if the programm has a session-save interface. Take a look at the chromium or the vim example.
They need only a wrapper, the call from open/save session and the storage stuff.
You find the wrapper for chromium in wmii-chromium and in the chromium fold of session.sh. The Vim wrapper consists of the alias from the readme and the vim fold in session.sh.
Then you need the open/save session functions (don't look at them ;). They invoke those wrappers and organise the files on the disk.

If you use only vim and chromium, you could delete most of the rest. Sorry for this obfuscation..

There is a generic session handling thing called dmtcp, but it doesn't work for X11 apps.
A PKGBUILD is here https://gist.github.com/1170915 , but my script is not yet ready to use it.

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

No branches or pull requests

5 participants