[sawfish] 3 new sawfish-mmc based functions



commit 60533c374c0264e96aa12ec5a916b766f2d5a473
Author: chrisb <zanghar freenet de>
Date:   Sat Jul 25 14:09:48 2009 +0200

    3 new sawfish-mmc based functions

 ChangeLog                                  |    2 +
 lisp/Makefile.in                           |    2 +-
 lisp/sawfish/wm/mmc/window-manipulation.jl |   39 ++++++++++++++++++++++++++++
 man/news.texi                              |    2 +
 4 files changed, 44 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 75817e7..25b3690 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
 
 	* configure.in: ... non-bash compatibility
 
+	* lisp/sawfish/wm/mmc/window-manipulation.jl: 3 new functions based on sawfish-mmc code (maximize-reframe, maximize-unframe, rename-window)
+
 2009-07-24  Christopher Bratusek <zanghar freenet de>
 	* lisp/sawfish/wm/frames.jl: support theme-tarballs compressed with XZ and LZMA (needs librep 0.90.1)
 
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index ea04649..ce62ad5 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -46,7 +46,7 @@ INSTALL_DIRS := \
 	sawfish/wm/animation sawfish/wm/theming \
 	sawfish/wm/state sawfish/wm/gnome sawfish/wm/util \
 	sawfish/wm/commands sawfish/wm/session \
-	sawfish/wm/tabs
+	sawfish/wm/tabs sawfish/wm/mmc
 
 all : lisp
 	set -e; for d in $(SUBDIRS); do \
diff --git a/lisp/sawfish/wm/mmc/window-manipulation.jl b/lisp/sawfish/wm/mmc/window-manipulation.jl
new file mode 100644
index 0000000..8339dd8
--- /dev/null
+++ b/lisp/sawfish/wm/mmc/window-manipulation.jl
@@ -0,0 +1,39 @@
+#|
+
+Functions taken from sawfish-mmc
+
+|#
+
+(define-structure sawfish.wm.mmc.window-manipulation
+
+  (export maximize-unframe
+          maximize-reframe)
+
+  (open rep
+        rep.system
+        sawfish.wm.state.maximize
+        sawfish.wm.windows
+        sawfish.wm.commands
+        sawfish.wm.misc
+	sawfish.wm.frames
+	sawfish.wm.util.prompt)
+
+  (define-structure-alias window-manipulation sawfish.wm.mmc.window-manipulation)
+
+  (define (maximize-unframe w)
+    (set-window-type w 'unframed)
+    (maximize-window w))
+
+  (define (maximize-reframe w)
+    (set-window-type w 'default)
+    (maximize-window w))
+
+  (autoload 'prompt-for-string "sawfish/wm/util/prompt-extras")
+
+  (define (rename-window w)
+    (let ((new-name (prompt-for-string "new title:" (window-name w))))
+      (set-x-text-property w '_NET_WM_NAME (vector new-name))))
+
+  (define-command 'maximize-unframe maximize-unframe #:spec "%W")
+  (define-command 'maximize-reframe maximize-reframe #:spec "%W")
+  (define-command 'rename-window rename-window #:spec "%W"))
diff --git a/man/news.texi b/man/news.texi
index 3a4926a..e7e21b7 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -34,6 +34,8 @@ they occurred between. For more detailed information see the
 
 @item Sawfish does now support theme-tarballs compressed with XZ or LZMA [Christopher Bratusek]
 
+ item 3 new sawfish-mmc based commands (maximize-unframe, maximize-reframe and rename-window) [Christopher Bratusek]
+
 @item 5 new move-cursor commands (move-cursor -northwest, -northeast, -southwest, -southeast), and move-cursor-center [Christopher Bratusek]
 
 @item Added fullscreen, fullscreen-xinerama and new-workspace matches [Jeremy Hankins]



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