£ukasz | 22 Dec 2010 05:05
Picon
Favicon

Saving/restore session

Hi, I want o task if its possible to restore previous ion session ( tob explicit, i created some workspaces,
puted in nice order programs etc. and suddenly i have to restart computer, so i have to reorganize
workspaces again). I havent found appropriate module or ion function to do this.

Regards Lukas

Olof Johansson | 22 Dec 2010 05:29
Picon
Gravatar

Re: Saving/restore session

On 2010-12-21 20:05 -0800, £ukasz wrote:
> Hi, I want o task if its possible to restore previous ion session ( tob 
> explicit, i created some workspaces, puted in nice order programs etc. 
> and suddenly i have to restart computer, so i have to reorganize 
> workspaces again). I havent found appropriate module or ion function to 
> do this.

The workspaces shouldn't be a problem, just do a "clean exit" or
save the session manually (ioncore.snapshot()). 

Having applications start in the "right" frame is another problem
though. I understand that it can be solved with kludges etc, but 
I haven't bothered so I can't help you unfortunately. Other people 
on the list probably knows.

--

-- 
- Olof Johansson
-  www:          http://www.stdlib.se/
-  {mail,xmpp}:  olof@...
-  irc:          zibri on Freenode/OFTC/...
--
£ukasz | 22 Dec 2010 06:09
Picon
Favicon

Re: Saving/restore session


--- On Wed, 12/22/10, Olof Johansson <olof@...> wrote:

> From: Olof Johansson <olof@...>
> Subject: Re: Saving/restore session
> To: ion-general@...
> Date: Wednesday, December 22, 2010, 5:29 AM
> On 2010-12-21 20:05 -0800, £ukasz
> wrote:
> > Hi, I want o task if its possible to restore previous
> ion session ( tob 
> > explicit, i created some workspaces, puted in nice
> order programs etc. 
> > and suddenly i have to restart computer, so i have to
> reorganize 
> > workspaces again). I havent found appropriate module
> or ion function to 
> > do this.
> 
> The workspaces shouldn't be a problem, just do a "clean
> exit" or
> save the session manually (ioncore.snapshot()). 
> 
> Having applications start in the "right" frame is another
> problem
> though. I understand that it can be solved with kludges
> etc, but 
> I haven't bothered so I can't help you unfortunately. Other
> people 
> on the list probably knows.
(Continue reading)

Olof Johansson | 22 Dec 2010 06:30
Picon
Gravatar

Re: Saving/restore session

On 2010-12-21 21:09 -0800, £ukasz wrote:
> Thanks, unfortunately i havent mentioned that im using ion2 not ion3 
> so no ioncore.snapshot ... i think its time to move to ion3

Ah, I made a hasty assumption. Sorry :-)

--

-- 
- Olof Johansson
-  www:          http://www.stdlib.se/
-  {mail,xmpp}:  olof@...
-  irc:          zibri on Freenode/OFTC/...
--
Sylvain Abélard | 22 Dec 2010 08:58
Picon

Re: Saving/restore session

Hi,

> Thanks, unfortunately i havent mentioned that im using ion2
> not ion3 so no ioncore.snapshot ... i think its time to move to ion3

Both versions save workspaces' layouts to lua files, when doing clean exits.
IIRC both provide with a menu option to save / load workspaces in that file.

~/.ion2/default-session/workspaces.lua
~/.ion3/default-session--0/saved_layout.lua

What I did was saving the layouts I like then removing write
authorizations on that file with chmod so it wouldn't get overriden on
exit.

Happy tiling,

--

-- 
Sylvain Abélard
"J’ai décidé d’être heureux, c’est meilleur pour la santé." -Voltaire

£ukasz | 22 Dec 2010 09:52
Picon
Favicon

Re: Saving/restore session


> Both versions save workspaces' layouts to lua files, when
> doing clean exits.
> IIRC both provide with a menu option to save / load
> workspaces in that file.
> 
> ~/.ion2/default-session/workspaces.lua
> ~/.ion3/default-session--0/saved_layout.lua
> 
> What I did was saving the layouts I like then removing
> write
> authorizations on that file with chmod so it wouldn't get
> overriden on
> exit.
> 
> 
 You right, but there is no information about programs opened in thise windows, as an example my latest workspaces.lua

initialise_screen_id(0, {
    type = "WScreen",
    name = "WScreen",
    subs = {
        {
            type = "WFloatWS",
            name = "main",
            managed = {
                {
                    type = "WFloatFrame",
                    name = "WFloatFrame",
                    flags = 24,
(Continue reading)

Etan Reisner | 23 Dec 2010 03:34

Re: Saving/restore session

Right, application information isn't saved.

You need a session manager (and SM aware applications) to have
applications automatically saved and restored.

Getting applications to start in the correct frames when they do start up
(manually or automatically) requires winprops/kludges be set up (as was
previously mentioned).

    -Etan

Sylvain Abélard | 26 Dec 2010 12:48
Picon

Re: Saving/restore session

>> ~/.ion2/default-session/workspaces.lua
>> ~/.ion3/default-session--0/saved_layout.lua

>  You right, but there is no information about programs opened in thise windows

As Etan said you have to use a SM or other personal tricks to only
launch / restore the apps you need.
Once your layout frames have names, and you know your favorite apps'
names and classes via xprop, you can setup kludges.

You can find examples for kludges.lua files on the Net:
 http://aperiodic.net/phil/configs/ion2/kludges.lua
 http://daelstorm.thegraveyard.org/ion2/ion2.html

Some apps may or may not have X names and classes, or they may be duplicate.
The typical example is emacs : if you want to open several windows in
different places,
you have to set command-line args to set them. The kludges then work as a charm.

--

-- 
Sylvain Abélard
"J’ai décidé d’être heureux, c’est meilleur pour la santé." -Voltaire

£ukasz | 30 Dec 2010 16:55
Picon
Favicon

Re: Saving/restore session


--- On Sun, 12/26/10, Sylvain Abélard <sylvain.abelard@...> wrote:

> From: Sylvain Abélard <sylvain.abelard@...>
> Subject: Re: Saving/restore session
> To: ion-general@...
> Date: Sunday, December 26, 2010, 12:48 PM
> >>
> ~/.ion2/default-session/workspaces.lua
> >> ~/.ion3/default-session--0/saved_layout.lua
> 
> >  You right, but there is no information about
> programs opened in thise windows
> 
> As Etan said you have to use a SM or other personal tricks
> to only
> launch / restore the apps you need.
> Once your layout frames have names, and you know your
> favorite apps'
> names and classes via xprop, you can setup kludges.
> 
> You can find examples for kludges.lua files on the Net:
>  http://aperiodic.net/phil/configs/ion2/kludges.lua
>  http://daelstorm.thegraveyard.org/ion2/ion2.html
> 
> Some apps may or may not have X names and classes, or they
> may be duplicate.
> The typical example is emacs : if you want to open several
> windows in
> different places,
(Continue reading)

ebik | 30 Dec 2010 20:20
Picon

Re: Saving/restore session

On Thu, 30 Dec 2010 07:55:43 -0800 (PST)
£ukasz <blurrpp@...> wrote:

> But i have another question. I'm using ion2/pwm2 and i want to resize
> actual window to some fixed sizes (maximize_vert and
> maximize_horiz_works only as they explicit say MAXIMALY ) i used
> request_geom(WRegion,size_table) but i have probelm with gettin
> current WRegion ( i read cerfully all manual and couldnt find
> function like WRegion WRegion.current() which would gave me handle to
> current region),s ohow to get it and maybe there is another way to
> fixed resize .
> 
> Regards Lukas

You should use correct binding (i.e., binding for WFrame or something
like that, I have no ion manual here), then the variable '_'
should contain the object, which was the binding triggered for. See
the part of manual that describes bindings.

--

-- 
                                 Tomáš 'ebík' Ebenlendr
                                 PF 2010.99683631405

£ukasz | 31 Dec 2010 16:09
Picon
Favicon

Rezise window to fixed size.


--- On Thu, 12/30/10, ebik <ebik@...> wrote:

> From: ebik <ebik@...>
> Subject: Re: Saving/restore session
> To: ion-general@...
> Date: Thursday, December 30, 2010, 8:20 PM
> On Thu, 30 Dec 2010 07:55:43 -0800
> (PST)
> £ukasz <blurrpp@...>
> wrote:
> 
> > But i have another question. I'm using ion2/pwm2 and i
> want to resize
> > actual window to some fixed sizes (maximize_vert and
> > maximize_horiz_works only as they explicit say
> MAXIMALY ) i used
> > request_geom(WRegion,size_table) but i have probelm
> with gettin
> > current WRegion ( i read cerfully all manual and
> couldnt find
> > function like WRegion WRegion.current() which would
> gave me handle to
> > current region),s ohow to get it and maybe there is
> another way to
> > fixed resize .
> > 
> > Regards Lukas
> 
> You should use correct binding (i.e., binding for WFrame or
(Continue reading)

ebik | 2 Jan 2011 22:37
Picon

Re: Rezise window to fixed size.

On Fri, 31 Dec 2010 07:09:22 -0800 (PST)
£ukasz <blurrpp@...> wrote:

> 
> --- On Thu, 12/30/10, ebik <ebik@...> wrote:
> 
> > From: ebik <ebik@...>
> > Subject: Re: Saving/restore session
> > To: ion-general@...
> > Date: Thursday, December 30, 2010, 8:20 PM
> > On Thu, 30 Dec 2010 07:55:43 -0800
> > (PST)
> > £ukasz <blurrpp@...>
> > wrote:
> > 
> > > But i have another question. I'm using ion2/pwm2 and i
> > want to resize
> > > actual window to some fixed sizes (maximize_vert and
> > > maximize_horiz_works only as they explicit say
> > MAXIMALY ) i used
> > > request_geom(WRegion,size_table) but i have probelm
> > with gettin
> > > current WRegion ( i read cerfully all manual and
> > couldnt find
> > > function like WRegion WRegion.current() which would
> > gave me handle to
> > > current region),s ohow to get it and maybe there is
> > another way to
> > > fixed resize .
> > > 
(Continue reading)

£ukasz | 3 Jan 2011 02:41
Picon
Favicon

Re: Rezise window to fixed size.

  
> I think that it should read:
> WMoveresMode.rqgeom(_,{x=10,y=10,w=100,h=100})
> (Not sure about the syntax right now, but the table has
> named entries.)
> 
> Second "R" should be pressed also with META in your
> example.
> 
> The triggered error probably wrote something to ion's
> stderr. I keep
> ion's stdout and stderr explicitly to ~/.xsession-errors,
> so I can check
> ion's output in case of bad bindings, kludges or other
> errors, that
> occur in "safe environment" -- being triggered by some
> event.
> 

Thanks again, yep for sure should be META+R, but problem was in {x=10,y=10,w=100,h=100} now works fine.

Regards Lukas


Gmane