From 916095eb4cdb241a200c5c72cbc66e87393e7172 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 17 Jun 2013 16:21:28 +0200 Subject: Use C-z as prefix key for most-used commands --- .sawfish/rc | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to '.sawfish/rc') 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) -- cgit v1.2.3-54-g00ecf