summaryrefslogtreecommitdiffstats
path: root/.sawfish/rc
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-06-17 16:21:28 +0200
committerGravatar Tom Willemse2013-06-17 16:21:28 +0200
commit916095eb4cdb241a200c5c72cbc66e87393e7172 (patch)
tree3a63d6dea12f34760b4637081bb6784c0bcd18b2 /.sawfish/rc
parent8fa2ae804b002c8f9941c4d35fb40c30e18bfd4f (diff)
downloaddotfiles-916095eb4cdb241a200c5c72cbc66e87393e7172.tar.gz
dotfiles-916095eb4cdb241a200c5c72cbc66e87393e7172.zip
Use C-z as prefix key for most-used commands
Diffstat (limited to '.sawfish/rc')
-rw-r--r--.sawfish/rc22
1 files changed, 16 insertions, 6 deletions
diff --git a/.sawfish/rc b/.sawfish/rc
index cfb3a16..9ba9e8d 100644
--- a/.sawfish/rc
+++ b/.sawfish/rc
@@ -15,6 +15,7 @@
(define oni:window-yanking-keymap (make-keymap))
(define oni:window-management-keymap (make-keymap))
(define oni:extended-keymap (make-keymap))
+(define my-keymap (make-keymap))
(defun oni:emacs-main-window-p (window)
"Check wether or not WINDOW is Emacs' main window."
@@ -61,6 +62,10 @@ raise it."
(if w (display-window w)
(call-command `(run-shell-command ,command)))))
+(define (send-cz window #!optional arg)
+ (synthesize-event "C-z" window))
+(define-command 'send-cz send-cz #:spec "%W\nP")
+
(setq custom-show-symbols t)
(setq default-frame-style 'naquadah)
(setq default-font (get-font-typed "Xft" "Monaco-10"))
@@ -116,6 +121,16 @@ raise it."
"w" oni:window-management-keymap
"Super-b" 'popup-window-list-menu)
+(bind-keys my-keymap
+ "C" '(run-shell-command "urxvt")
+ "C-b" 'popup-window-list-menu
+ "E" '(run-shell-command (getenv "EDITOR"))
+ "W" '(run-shell-command (getenv "BROWSER"))
+ "c" '(oni:run-or-raise "urxvt" #:class "URxvt")
+ "e" '(oni:run-or-raise (getenv "EDITOR") #:class "Emacs")
+ "w" '(oni:run-or-raise (getenv "BROWSER") #:class "Conkeror")
+ "z" 'send-cz)
+
;; (ungrab-keymap global-keymap)
(bind-keys
global-keymap
@@ -134,23 +149,18 @@ raise it."
"Super-!" '(run-shell-command (prompt-for-string "Run: "))
"Super-:" 'call-command
"Super-B" 'yank-window-left
- "Super-C" '(run-shell-command "urxvt")
- "Super-E" '(run-shell-command (getenv "EDITOR"))
"Super-F" 'yank-window-right
"Super-M" 'maximize-window-toggle
"Super-N" 'yank-window-down
"Super-P" 'yank-window-up
"Super-TAB" 'cycle-windows
- "Super-W" '(run-shell-command (getenv "BROWSER"))
"Super-`" 'popup-root-menu
"Super-b" 'pack-window-left
- "Super-c" '(oni:run-or-raise "urxvt" #:class "URxvt")
- "Super-e" '(oni:run-or-raise (getenv "EDITOR") #:class "Emacs")
"Super-f" 'pack-window-right
"Super-n" 'pack-window-down
"Super-p" 'pack-window-up
- "Super-w" '(oni:run-or-raise (getenv "BROWSER") #:class "Conkeror")
"Super-x" oni:extended-keymap
+ "C-z" my-keymap
)
;; (grab-keymap global-keymap)