ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RP] [PATCH] Built-in workspaces


From: Repolho
Subject: [RP] [PATCH] Built-in workspaces
Date: Mon, 28 Oct 2013 18:08:29 -0200
User-agent: Mutt/1.5.22 (2013-10-16)

Here's a proposed implementation of built-in workspaces that keeps the
group system intact from the user's point of view. It performs
noticeably better under heavy CPU or disk usage than external solutions.

It works by storing an sfdump into the current group before a group
change, and then allowing for the user to restore those dumps when he
goes back to that group. This is accomplished by making available two
new user commands: grestore and gclean.

grestore will restore the sfdump stored in a group (defaulting to the
current one). gclean will empty any frames whose windows don't belong to
a group (also defaulting to the current one).

By adding both these commands to the switchgroup hook, the user will get
built-in workspaces, where switching to another group restores the
screens' state to the last state they were in when that group was last
used. By not using the commands at all, the user will get the usual
group behavior. The only difference for the latter is the extra memory
usage of storing an sfdump per group, and the extra CPU usage of an
sfdump() call per group change, both of which are insignificant and
unnoticeable.

Additionally, the patch also adds a new hook, movetogroup, to be
triggered when a window is moved to another group. This is so that the
user can add gclean to said hook, so the window will disappear from the
screen after being moved. Again, a user that chooses not to do anything
will experience the same group behavior as always.


A sample configuration file is also attached to ease testing.

I look forward to hearing your opinions on the idea as well as the
implementation.

Attachment: ratpoison-builtin-workspaces.patch
Description: Text Data

Attachment: ratpoisonrc_workspaces
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]