[VOTE] expand-window Vs maximize-fill-window



Hi all,

sawfish has an expand function, which is called maximize-fill-window,
but there's no oposite to that, so I added (locally) contract-window,
which is based on shrink-window-*. Now the Question is, what do you like
better:

a) replace maximize-fill-window by grow-window-* based expand-window
b) add maximize-unfill-window (ugly name I know)

?

local diff attached.

Chris
diff --git a/lisp/sawfish/wm/commands/grow-pack.jl b/lisp/sawfish/wm/commands/grow-pack.jl
index 632bd47..68cc4c3 100644
--- a/lisp/sawfish/wm/commands/grow-pack.jl
+++ b/lisp/sawfish/wm/commands/grow-pack.jl
@@ -33,7 +33,8 @@
 	    pack-window-left
 	    pack-window-right
 	    pack-window-up
-	    pack-window-down)
+	    pack-window-down
+	    expand-window)
 
     (open rep
 	  sawfish.wm.windows
@@ -139,6 +140,13 @@ With a numeric prefix arg, move upwards by that many pixels instead."
 See `pack-window-up'."
     (pack-window w 'down arg))
 
+  (define (expand-window w #!optional arg)
+    "Expands a window. (grow in all four directions)"
+    (grow-window w 'up arg)
+    (grow-window w 'right arg)
+    (grow-window w 'down arg)
+    (grow-window w 'left arg))
+
   ;; Command defs
 
   ;;###autoload
@@ -150,6 +158,7 @@ See `pack-window-up'."
   (define-command 'pack-window-right pack-window-right #:spec "%W\nP")
   (define-command 'pack-window-up pack-window-up #:spec "%W\nP")
   (define-command 'pack-window-down pack-window-down #:spec "%W\nP")
+  (define-command 'expand-window expand-window #:spec "%W\nP")
 
   ;; Implementation part.
 
diff --git a/lisp/sawfish/wm/commands/shrink-yank.jl b/lisp/sawfish/wm/commands/shrink-yank.jl
index c6db7dd..78ef8f9 100644
--- a/lisp/sawfish/wm/commands/shrink-yank.jl
+++ b/lisp/sawfish/wm/commands/shrink-yank.jl
@@ -30,7 +30,8 @@
             yank-window-left
             yank-window-right
             yank-window-up
-            yank-window-down)
+            yank-window-down
+	    contract-window)
 
     (open   rep
             sawfish.wm.commands
@@ -88,6 +89,13 @@ before."
 before."
     (yank-window window 'down))
 
+  (define (contract-window window)
+    "Contracts a window. (shrink in all four directions)"
+    (shrink-window window 'up)
+    (shrink-window window 'right)
+    (shrink-window window 'down)
+    (shrink-window window 'left))
+
   ;;###autoload
   (define-command 'shrink-window-left shrink-window-left #:spec "%W")
   (define-command 'shrink-window-right shrink-window-right #:spec "%W")
@@ -97,6 +105,7 @@ before."
   (define-command 'yank-window-right yank-window-right #:spec "%W")
   (define-command 'yank-window-up yank-window-up #:spec "%W")
   (define-command 'yank-window-down yank-window-down #:spec "%W")
+  (define-command 'contract-window contract-window #:spec "%W")
 
 ;;; Implementation:
 

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil



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