[sawfish/sawfish-2.90] added toggle-or-exec wrapper func to jump-or-exec
- From: Christopher Bratusek <chrisb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sawfish/sawfish-2.90] added toggle-or-exec wrapper func to jump-or-exec
- Date: Tue, 26 Oct 2010 15:09:39 +0000 (UTC)
commit 8eb81346c929100dea97781fc0e9cfa38784ccbb
Author: Christopher Roy Bratusek <zanghar freenet de>
Date: Tue Oct 26 17:08:46 2010 +0200
added toggle-or-exec wrapper func to jump-or-exec
ChangeLog | 4 ++++
lisp/sawfish/wm/commands/jump-or-exec.jl | 12 +++++++++---
2 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index baad327..d574601 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-26 Christopher Bratusek <zanghar freenet de>
+ * lisp/sawfish/wm/commands/jump-or-exec.jl: added toggle-or-exec wrapper
+ updated introduction part
+
2010-10-25 Christopher Bratusek <zanghar freenet de>
* lisp/sawfish/wm/ext/match-window.jl: add iconify-on-leave window-matcher
diff --git a/lisp/sawfish/wm/commands/jump-or-exec.jl b/lisp/sawfish/wm/commands/jump-or-exec.jl
index 43b5506..7ed1fb3 100644
--- a/lisp/sawfish/wm/commands/jump-or-exec.jl
+++ b/lisp/sawfish/wm/commands/jump-or-exec.jl
@@ -46,13 +46,13 @@
;; => application dolphin matched on it's WM_NAME
;; => will be iconified when key pressed while it's focused
;; ( bind-keys global-keymap "Home"
-;; `( jump-or-exec "Dolphin" "dolphin ~" #:onfocused jump-or-exec-leave )
+;; `( toggle-or-exec "Dolphin" "dolphin ~" )
;;
;; => application konsole matched on it's WM_CLASS
;; => will be iconified when key pressed while it's focused
;; => will also be iconified when the cursor leaves it
;; ( bind-keys global-keymap "F12"
-;; `( jump-or-exec "Konsole" "konsole" #:match-class t #:onfocused jump-or-exec-leave )
+;; `( toggle-or-exec "Konsole" "konsole" #:match-class t )
;;
;; ( add-window-matcher '( ( WM_CLASS . "^Konsole/konsole$" ) )
;; '( ( iconify-on-leave .t ) ) )
@@ -60,7 +60,8 @@
(define-structure sawfish.wm.commands.jump-or-exec
(export jump-or-exec
- jump-or-exec-leave)
+ jump-or-exec-leave
+ toggle-or-exec)
(open rep
rep.system
@@ -99,6 +100,11 @@
(let ((default-window-animator 'none))
(iconify-window (input-focus))))
+ (define (toggle-or-exec re prog #!key match-class)
+ (if match-class
+ (jump-or-exec re prog #:match-class t #:onfocused jump-or-exec-leave)
+ (jump-or-exec re prog #:onfocused jump-or-exec-leave)))
+
(define (jump-or-exec-hook)
(if (and (not (eq (current-event-window) 'root)) ;; may error on startup else
(window-get (current-event-window) 'iconify-on-leave))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]