Re: Tabs



On Tue, Mar 3, 2009 at 2:05 AM, Fernando <ferkiwi gmail com> wrote:
> In fact, I believe that "cycle-groups"/"cycle-classes" would also be a
> great addition (it will be almost as useful as the tabs), since
> currently there's only cycle commands to cycle inside a group or
> inside a class, but not between the top members of different
> groups/classes.


I've created right now a custom cycle-command for the "cycle-groups".
It seems to work fine ^^

Here's the patch


Index: lisp/sawfish/wm/commands/x-cycle.jl
===================================================================
--- lisp/sawfish/wm/commands/x-cycle.jl	(revision 4426)
+++ lisp/sawfish/wm/commands/x-cycle.jl	(working copy)
@@ -347,7 +347,17 @@
      (delete-if-not window-in-cycle-p (windows-in-group w)))
    #:spec "%W")

+
   (define-cycle-command-pair
+   'cycle-groups 'cycle-groups-backwards
+   (lambda ()
+     "Only cycle the top members of each group."
+     (mapcar
+      (lambda (gid) (car (windows-by-group gid)))
+      (window-group-ids))))
+
+
+  (define-cycle-command-pair
    'cycle-prefix 'cycle-prefix-backwards
    (lambda (w)
      (when (string-match "^([^:]+)\\s*:" (window-name w))
@@ -388,6 +398,8 @@
 ###autoload (autoload-command 'cycle-windows-backwards
'sawfish.wm.commands.x-cycle)
 ###autoload (autoload-command 'cycle-group 'sawfish.wm.commands.x-cycle)
 ###autoload (autoload-command 'cycle-group-backwards
'sawfish.wm.commands.x-cycle)
+###autoload (autoload-command 'cycle-groups 'sawfish.wm.commands.x-cycle)
+###autoload (autoload-command 'cycle-groups-backwards
'sawfish.wm.commands.x-cycle)
 ###autoload (autoload-command 'cycle-prefix 'sawfish.wm.commands.x-cycle)
 ###autoload (autoload-command 'cycle-prefix-backwards
'sawfish.wm.commands.x-cycle)
 ###autoload (autoload-command 'cycle-class 'sawfish.wm.commands.x-cycle)



--
Fernando


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