3 (require 'rep.io.timers)
5 (waffle-initialize () )
7 (require 'jump-or-exec)
8 (bind-keys global-keymap
9 "H-i" `(jump-or-exec "GVIM"
13 (display-window wind))))
14 (bind-keys global-keymap
15 "H-y" `(jump-or-exec "gterm"
17 (system "gnome-terminal &"))
19 (display-window wind))))
20 (bind-keys global-keymap
21 "H-z" `(jump-or-exec "Mozilla"
23 (system "/usr/local/firefox/firefox &"))
25 (display-window wind))))
26 (bind-keys global-keymap
27 "H-m" `(jump-or-exec "emelFM2"
31 (display-window wind))))
33 (define-match-window-setter 'keymap-trans
34 (lambda (w prop value)
35 (declare (unused prop))
36 (let ((keymap (or (window-get w 'keymap)
37 (window-put w 'keymap (copy-sequence window-keymap)))))
39 (lambda (pair) ; pair of from and to keys
42 (lambda () (interactive)
43 ;(synthesize-event (lookup-event (cadr pair)) w)
45 (if (string-match (cadr pair) (window-name w))
46 (synthesize-event (lookup-event (caddr pair)) (input-focus))
48 (if (string-match (cadr pair) "shell")
49 (delete-window-safely w)
53 ;(synthesize-event (lookup-event (car(cddr pair))) (input-focus))
54 ;(synthesize-event (lookup-event "C-SPC") (input-focus))
55 ;(if (string-match ".*GVIM.*i e" (window-name w))
56 ;(synthesize-event (lookup-event (car(cddr pair))) (input-focus))
58 ;(if (string-match ".*GVIM.*i c" (window-name w))
59 ;(synthesize-event (lookup-event (car(cddr pair))) (input-focus))
61 (if (string-match (cadddr pair) (window-name w))
62 (synthesize-event (lookup-event (car(cddddr pair))) (input-focus)
63 ;(synthesize-event (lookup-event (car (cddddr pair))) (input-focus))
66 ;(if (string-match ".*GVIM.*n c" (window-name w))
67 ;(synthesize-event (lookup-event (car(cddr pair))) (input-focus))
75 (add-window-matcher 'WM_CLASS "^Gvim/gvim$"
76 '(keymap-trans . (("C-SPC" ".*GVIM.*i.* " "F2" ".*GVIM.*i e" "C-SPC") ("ESC" ".*GVIM.*i c" "C-SPC" ".*GVIM.*" "ESC") )))
77 (add-window-matcher 'WM_NAME "^View Items$"
78 '(keymap-trans . (("x" "shell" "delete-window-safely" "test"))))
79 (add-window-matcher 'WM_CLASS "^emelfm2/main$"
80 '(keymap-trans . (("C-/" ".*emelFM2.*" "." ".*emelFM2.*" "BS"))))
81 ;(add-window-matcher 'WM_CLASS "^Gvim/gvim$"
82 ;'(keymap-trans . (("esc" "esc" "C-SPC"))))
83 ;(add-window-matcher 'WM_NAME "*GVIM* i c$"
84 ;'(keymap-trans . (("C-SPC" "C-F2") )))
85 ;(add-window-matcher 'WM_CLASS "^Firefox-bin/Gecko$"
86 ;'(keymap-trans . (("H-j" "Down") ("H-k" "Up"))))
87 ;(add-window-matcher 'WM_CLASS "*"
88 ;'(keymap-trans . (("H-j" "Down") ("H-k" "Up"))))
90 ;(require 'switch-viewports)
91 ;(bind-keys global-keymap "M-C-j" 'switch-viewport-up)
93 ;(require 'viewport-scrolling)
94 ;(bind-keys global-keymap "M-C-j" 'scroll-viewport-up)
96 (bind-keys window-keymap "C-M-j" 'pack-window-down)
97 (bind-keys window-keymap "C-M-k" 'pack-window-up)
98 (bind-keys window-keymap "C-M-h" 'pack-window-left)
99 (bind-keys window-keymap "C-M-l" 'pack-window-right)
101 (set-number-of-workspaces 2)
103 (define-special-variable viewport-dimensions '(2 . 2)
104 "Size of each virtual workspace.")
106 ;(define-special-variable uniconify-to-current-viewport t
107 ;"Windows uniconify to the current viewport.")
109 (define-special-variable workspace-boundary-mode 'stop
110 "How to act when passing the first or last workspace, one of
111 `stop', `wrap-around' or `keep-going'")
113 (define-special-variable edge-flip-type 'viewport
114 "Control what hitting the screen edge selects, workspace or viewport.")
116 (define-special-variable customize-command-classes '(viewport default)
117 "Also include commands of these classes the key bindings panel.
118 Add the `viewport' keyboard to make viewport commands show up.")
120 (bind-keys global-keymap "H-j" 'move-viewport-down)
121 (bind-keys global-keymap "H-k" 'move-viewport-up)
122 (bind-keys global-keymap "H-h" 'move-viewport-left)
123 (bind-keys global-keymap "H-l" 'move-viewport-right)
125 (bind-keys global-keymap "M-H-j" 'move-window-down)
126 (bind-keys global-keymap "M-H-k" 'move-window-up)
127 (bind-keys global-keymap "M-H-h" 'move-window-left)
128 (bind-keys global-keymap "M-H-l" 'move-window-right)
130 (bind-keys global-keymap "M-C-y" 'restart)
132 (bind-keys global-keymap "H-p" '(system "sh ~/bin/chang-proxy.sh &"))
134 (bind-keys global-keymap "H-v" '(system "gvim -f &"))
136 (bind-keys global-keymap "H-q" '(system "/etc/acpi/hibernate.sh &"))