-
Notifications
You must be signed in to change notification settings - Fork 10
/
.stumpwmrc.fabrice
678 lines (499 loc) · 21.3 KB
/
.stumpwmrc.fabrice
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
;; Hey, Emacs! This is a -*- lisp -*- file!
;;; .stumpwmrc --- my StumpWM Init File
;; Copyright (C) 2008-2010 Fabrice Niessen
;; Time-stamp: <2010-06-21 Mon 14:30 sva on mundaneum>
;; Author: Fabrice Niessen <(concat "fni" at-symbol "mygooglest.com")>
;; Keywords: stumpwm, dotfile, config
;; $Revision: 1933 $
;; $Date: 2010-06-21 14:06:22 +0200 (Mon, 21 Jun 2010) $
;;* Comment:
;; This config is known to work with stumpwm 0.9.6, and should work with
;; later versions as well.
;; You should specify full path to contrib modules. (load "~/...") works on
;; CLisp but doesn't work on SBCL...
;;* TODO
;; - Add googlers or wikiers functions?
;;* Code:
;; This file is only provided as an example. Customize it to your own taste!
;; See http://www.nongnu.org/stumpwm/manual/stumpwm.html
(in-package :stumpwm)
(message "Loading rc!")
(run-shell-command "rm .xsession-errors")
;; (run-shell-command "~/bin/x-second-monitor")
;; ;; load Swank so we can connect with SLIME
;; (load "/usr/share/emacs/site-lisp/slime/swank-loader.lisp")
;; (swank-loader:init)
;; (defvar *swank-p* nil)
;;
;; ;; define swank command to start swank server on port 4005
;; (defcommand swank () ()
;; "Starts a swank server on port 4005 and notifies the user."
;; (setf stumpwm:*top-level-error-action* :break)
;; (if *swank-p*
;; (message "Swank server already running.")
;; (progn
;; (swank:create-server :port 4005
;; :style swank:*communication-style*
;; :dont-close t)
;; (setf *swank-p* t)
;; (message "Starting swank on port 4005."))))
;;** 2 (info "(stumpwm)Key Bindings")
;; `*top-map*' is the top level key map. This is where you'll find the
;; binding for the prefix map.
;;
;; `*root-map*' is the keymap by default bound to `C-t'. It is known as the
;; prefix map.
;;*** --2.2 (info "(stumpwm)Binding Keys")
;; TODO Check this out!
;; unison synchronization
(defcommand unison-synchronization (host) ((:rest "Synchro host: "))
(run-shell-command (concat "/home/sva/bin/unisync " host)))
;; screenshot-to-website
(defcommand screenshot-to-website (filename) ((:rest "Filename: "))
(run-shell-command
(format nil
"import -window root /home/m0rg/code/html/patzy/screenshots/~a"
filename)))
;; screenshot-to-file
(defcommand screenshot-to-file (filename) ((:rest "Filename: "))
(run-shell-command
(format nil "import -window root ~a" filename)))
;; Keyboard Shortcuts
;;**** Sound
;; mixer
;; XXX `m' conflicts with `lastmsg'
(define-key *root-map* (kbd "m") "exec xterm -rv -e alsamixer")
;;**** Desktop
;; launch Emacs
(defcommand emacs () () ;! redefining emacs command
"Start Emacs or switch to it, if it is already running."
(run-or-raise "emacs" '(:class "Emacs")))
;; mail notification
;; use `blink -c -r 1' (TODO Install `blinkd') for new mail (to be configured
;; via `gconf-editor' -> apps -> mail-notification -> commands)
;; launch Web browser
(defcommand firefox () ()
"Start Firefox or switch to it, if it is already running."
(run-or-raise "firefox" '(:class "Firefox")))
(define-key *root-map* (kbd "f") "firefox")
;; run an `urxvt' terminal (instead of `xterm')
;; TODO Install `rxvt-unicode'
;; FIXME If urxvt is not installed, let default keybinding
(defcommand urxvt () ()
"Start an urxvt instance or switch to it, if it is already running."
(run-or-raise "urxvt" '(:instance "urxvt")))
(define-key *root-map* (kbd "c") "urxvt")
; How do I scroll in a `urxvt' or in a `Ctrl-Alt-F6' command prompt?
; Shift + Pg Up/Dn
;
; How do I paste text to an `urxvt' terminal?
; Shift + Insert
;; too dangerous (easily typed!)
;; ;; log out
;; (define-key *root-map* (kbd "q") "quit")
;; ;; shutdown
;; (define-key *root-map* (kbd "Delete") "exec gksudo halt")
;; lock screen (x or L or l?)
(define-key *root-map* (kbd "L") "exec xtrlock")
(define-key *root-map* (kbd "M-l") "exec xset dpms force off")
;; take a screenshot of the screen (using PrtSc)
;; TODO Install `imagemagick' (for getting the `import' command)
(define-key *root-map* (kbd "Print")
"exec import -window root png:$HOME/Desktop/screenshot_$(date +%F_%H-%M-%S).png")
;; take a screenshot of a window (using Alt-PrtSc)
;; TODO Install `scrot'
(defcommand part-screenshot () ()
"Take a screenshot of only the active window."
(run-shell-command "scrot -s"))
(define-key *top-map* (kbd "M-Print") "part-screenshot")
;;**** Window Management
;; push the window in the adjacent frame
(define-key *root-map* (kbd "C-Up") "move-window up")
(define-key *root-map* (kbd "C-Left") "move-window left")
(define-key *root-map* (kbd "C-Down") "move-window down")
(define-key *root-map* (kbd "C-Right") "move-window right")
(define-key *root-map* (kbd "Delete") "repack-window-numbers")
(define-key *root-map* (kbd "I") "show-window-properties")
;;**** Custom Shortcuts
;; keyboard layout (toggling between "qwerty-gb" and "azwerty-fr" via
;; `Caps_Lock')
(run-shell-command "setxkbmap -model \"pc105\" -layout \"gb,fr\" -option \"grp:caps_toggle,grp_led:scroll\"")
;; FIXME grp_led:caps??
;; aptitude
(define-key *root-map* (kbd "&") "exec xterm -rv -e aptitude")
;; openvpn
;; (define-key *root-map* (kbd "o") "exec xterm -name vpnup -rv -e \"sudo openvpn mcbe.vpn\"")
;; ;; (define-key *root-map* (kbd "o") "exec xterm -name vpnup -rv -e \"sudo openvpn --config mcbe.vpn\"")
;; FIXME This does not work.
(defcommand openvpn () ()
(run-or-raise
"urxvt -title openvpn -cd /home/sva/.hide/ -e sudo ./openvpn mcbe.vpn"
'(:title "openvpn" :instance "urxvt" :class "URxvt"))
:all-screens t
:all-groups t)
(define-key *root-map* (kbd "o") "openvpn")
;;** Commands
(defparameter *start-menu*
'(
("Graphics"
("Color Picker" "gcolor2")
("GIMP" "gimp")
("Inkscape" "inkscape")
("Picasa" "picasa")
("Scanner" "xsane")
("OCR" "gocr"))
("Internet"
("Filezilla" "filezilla")
("Firefox" "firefox")
("Skype" "skype"))
("Office"
("OpenOffice.org" "openoffice"))
("Sound and Video"
("Europe 1" "mplayer http://vipicecast.yacast.net/europe1")
("RTL" "mplayer http://streaming.radio.rtl.fr/rtl-1-44-96")
("Mixer" "xterm -rv -e alsamixer")
("K3b Burner" "k3b")
("Eject CD-ROM" "eject cdrom"))
("System Tools"
("Calculator" "speedcrunch")
("Disk space" "filelight")
("File Manager" "nautilus") ; thunar
("Nvidia X Server" "nvidia-settings")
("Power Preferences" "gnome-power-preferences")
("Printers" "system-config-printer")
("Terminal Server" "tsclient")
; Turn on "Enable window manager's key bindings" for prefix key to
; be passed seamlessly (when *not* in full screen).
; Toggle between full screen and not full screen using
; `Ctrl-Alt-Enter'.
;; > In the case of Rdesktop you have to launch the app with the option
;; > '-K' so Stump can retain control over the key combinations that you
;; > input inside the remote session.
("VirtualBox" "VirtualBox"))
("X Windows Tools"
("Clipboard" "xclipboard")
("Fonts" "xfontsel")
("Ruler" "kruler")
("Events" "xev"))
))
(defcommand menu () ()
"docstring"
(labels ((pick (options)
(let ((selection (stumpwm::select-from-menu
(current-screen) options "")))
(cond
((null selection)
(throw 'stumpwm::error "Abort."))
((stringp (second selection))
(second selection))
(t
(pick (cdr selection)))))))
(let ((choice (pick *start-menu*)))
(run-shell-command choice))))
(define-key *root-map* (kbd ".") "menu")
(defcommand reinit () ()
"docstring"
(run-commands "reload" "loadrc"))
;; from http://en.wikipedia.org/wiki/User:Gwern/.stumpwmrc
(defun cat (&rest strings) "A shortcut for (concatenate 'string foo bar)."
(apply 'concatenate 'string strings))
;; Web browsing commands
;; Get the X selection and order the GUI browser to open it. Presumably it
;; is a HTTP address.
(defcommand open-selection-browser () ()
"docstring"
(run-shell-command (cat "exec firefox " (get-x-selection))))
;; Ask user for a search string and search Wikipedia for it.
;; (defcommand wikipedia ((search-string :string "wikipedia " :string)) ()
;; (check-type search-string string)
;; (run-shell-command (cat "exec firefox wikipedia " search-string)))
;; Web jump (works for Google)
(defmacro make-web-jump (name prefix)
`(defcommand ,name (search) ((search :rest ,(concatenate 'string name " search: ")))
(substitute #\+ #\Space search)
(run-shell-command (concatenate 'string ,prefix search))))
;; (make-web-jump "ggoogle" "firefox http://www.google.com/search?q=")
(define-key *root-map* (kbd "z") "google")
;; ask the user for a search string and search for it in Wikipedia
(defcommand wikipedia (search)
((:string "Search in Wikipedia for: "))
"docstring"
(check-type search string)
(substitute #\+ #\Space search)
(run-shell-command (cat "firefox http://www.wikipedia.org/wiki/" search)))
;; ask the user for a search string and search for it in Google
(defcommand google (search)
((:string "Search in Google for: "))
"docstring"
(check-type search string)
(substitute #\+ #\Space search)
(run-shell-command (cat "firefox http://www.google.com/search?q=" search)))
;; courtesy of Peter Seibel
(defmacro with-gensyms ((&rest names) &body body)
`(let ,(loop for n in names collect `(,n (gensym)))
,@body))
(defmacro program-with-layout (name &key (command (string-downcase (string name)))
(props `'(:class ,(string-capitalize command))))
(with-gensyms (s w h files-path layout rules)
`(defcommand ,name () ()
(let* ((,s (current-screen))
(,w (prin1-to-string (screen-width ,s)))
(,h (prin1-to-string (screen-height ,s)))
(,files-path "/home/sva/etc/stumpwm_files/")
(,layout (concat ,files-path ,command "-layout-" ,w "x" ,h))
(,rules (concat ,files-path ,command "-rules")))
(gnew ,command)
(restore-from-file ,layout)
(restore-window-placement-rules ,rules)
(run-or-raise ,command ,props)
(place-existing-windows))))) ; needed if command was already run
(program-with-layout gimp)
;;** 3 (info "(stumpwm)Message and Input Bar")
;;*** 3.1 (info "(stumpwm)Customizing The Bar")
;; Find a font of your choice in `xfontsel' and put it here.
;; set the font for the message bar and input bar
;; (set-font "-*-FreeMono-medium-r-*-*-6*")
(set-font "-adobe-helvetica-medium-r-normal--10*")
;;** 4 (info "(stumpwm)Windows")
;; how to format the window list
(setf *window-format* "^B%m%n^b %40t ")
;;*** 4.2 (info "(stumpwm)Customizing Window Appearance")
;; width in pixels given to the borders of windows with maxsize or ratio
;; hints
(setf *maxsize-border-width* 1)
;; width in pixels given to the borders of transient or pop-up windows
(setf *transient-border-width* 1)
;; width in pixels given to the borders of regular windows
(setf *normal-border-width* 1)
;; TODO Install `xloadimage' (for getting the `xsetbg' command)
(run-shell-command "which xsetbg && xsetbg -fullscreen /usr/share/backgrounds/GrassinA.jpg")
;; set the border color for focused windows
(set-focus-color "orange") ; `white' by default
(set-unfocus-color "palegreen3")
;; input focus is transferred to the window you click on
(setf *mouse-focus-policy* :click)
;; (defun banish-mouse (from-frame to-frame)
;; (run-commands "banish"))
;; (add-hook *focus-window-hook* 'banish-mouse)
;;** 5 (info "(stumpwm)Frames")
;; make frames 1-indexed
;; See http://lists.gnu.org/archive/html/stumpwm-devel/2006-08/msg00002.html
(setf *frame-number-map* "1234567890")
;; FIXME Does not work
;; from simias
(defun shift-windows-forward (frames win)
(when frames
(let ((frame (car frames)))
(shift-windows-forward (cdr frames)
(frame-window frame))
(when win
(pull-window win frame)))))
(defcommand rotate-windows () ()
(let* ((frames (group-frames (current-group)))
(win (frame-window (car (last frames)))))
(shift-windows-forward frames win)))
;; swap 2 windows
(define-key *root-map* (kbd "~") "rotate-windows")
;; from simias
(defcommand toggle-split () ()
(let* ((group (current-group))
(cur-frame (tile-group-current-frame group))
(frames (group-frames group)))
(if (eq (length frames) 2)
(progn (if (or (neighbour :left cur-frame frames)
(neighbour :right cur-frame frames))
(progn
(only)
(vsplit))
(progn
(only)
(hsplit))))
(message "Works only with 2 frames"))))
;; toggle between vertical split and horizontal split
(define-key *root-map* (kbd "|") "toggle-split")
;;** 6 The (info "(stumpwm)Mode-line")
;; modeline foreground color
(setf *mode-line-foreground-color* "palegreen3")
;; modeline border color
(setf *mode-line-border-color* "palegreen3")
;; set contrib directory
(set-contrib-dir "/home/sva/src/stumpwm/contrib")
;; load a few modules
(mapcar #'load-module '("cpu"
"mem"
"battery-portable"
"net"
"wifi"
"disk"))
(defconstant *day-names*
'("Mon" "Tue" "Wed" "Thu" "Fri" "Sat" "Sun"))
(defun current-date ()
"Returns the date formatted as `2009-11-16 Mon 11:34:03'."
(multiple-value-bind
(second minute hour date month year day-of-week dst-p tz)
(get-decoded-time)
(format nil "~d-~2,'0d-~2,'0d ~a ^B~2,'0d:~2,'0d:~2,'0d^b"
year month date (nth day-of-week *day-names*)
hour minute second)))
;; FIXME ppp0 comes after lo0; hence, the IP is wrong
(defun current-ip ()
"Returns the IP address in CIDR notation."
(run-shell-command
"IP_ADDRESS=`ifconfig | grep 'inet addr:' | head -n 1 | sed 's/.*addr:\\([0-9.]*\\).*/\\1/'`; NETMASK=`ifconfig | grep 'inet addr:' | head -n 1 | sed 's/.*Mask:\\([0-9.]*\\).*/\\1/'`; NETWORK=`ipcalc -n -b $IP_ADDRESS $NETMASK | grep Network | awk '{print $2}'`; echo -n IP:$IP_ADDRESS`echo $NETWORK | sed 's/.*\\(\\/.*\\)/\\1/g' | tr -d '[:cntrl:]'`"
t))
(defun current-gw ()
"Returns the default gateway."
(run-shell-command
"echo -n Gw:`ip route show | grep default | awk '{print $3}' | tr -d '[:cntrl:]'`"
t))
;; TODO Get this in a lighter manner, by parsing /proc/net/route. See, for
;; example, contribs/net.lisp.
;; %h :: List the number of the head the mode-line belongs to
;; %w :: List all windows in the current group windows using `*window-format*'
;; %W :: List all windows on the current head of the current group using `*window-format*'
;; %g :: List the groups using `*group-format*'
;; colors
;; 0 = black, 1 = red, 2 = green, 3 = yellow,
;; 4 = blue, 5 = magenta, 6 = cyan, 7 = white
;; %N :: notifications
;; what's `^n'?
;; what's `%48'?
;; what will be displayed on the modeline (sort of taskbar) for each screen
;; FIXME `run-shell-command' in mode-line could be the source of StumpWM crashes?
(setf *screen-mode-line-format*
(list
;; date
"^6*" '(:eval (current-date)) ; defined above
;; cpu | mem | battery
" | %D | %c %C (%f) %t | %M | %B"
;; ip and gw
" | " '(:eval (current-ip)) " " '(:eval (current-gw)) ; defined above
;; net | wifi
" | %l | %I"
'(:eval (run-shell-command "echo" t))
"^2*" "[^B%n^b] %W%48"))
;; how many seconds elapse between each update of the modeline
(setf *mode-line-timeout* 1) ; must be set *before* turning on the modeline
;; turn on the modeline
(if (not (head-mode-line (current-head)))
(toggle-mode-line (current-screen) (current-head)))
; A head is a physical monitor. A screen is a section of video memory
; that heads are mapped on to. When using xinerama you generally have
; 1 screen and many heads. When not using xinerama each screen is a
; physical monitor so you have many screens with only one head on them.
;; number of padding pixels between the modeline text and the top/bottom of
;; the modeline
(setf *mode-line-pad-y* 0)
;; modeline background color
(setf *mode-line-background-color* "black")
;; TODO add hook so I get notified when people say my name on IRC or IM me
(defun echo-urgent-window (target)
(message-no-timeout "~a has an message for you." (window-title target)))
(add-hook *urgent-window-hook* 'echo-urgent-window)
;;** 7 (info "(stumpwm)Groups")
;; Super_L-F1..F9 to change workspace
;; Is there a way to share windows between several groups?
;; Try using tags. A window can have arbitrary set of tags, and there is a
;; command to pull all windows which have any of the specified tags to current
;; group. Bind some tags to F1-F10 instead of groups, and you are done.
;; create the other groups
(run-commands "gnewbg Other")
;;** 9 (info "(stumpwm)Interacting With Unix")
;; shell program used by `run-shell-command' (`sh' by default, which is *not*
;; `bash' nor `zsh')
(setq *shell-program* (stumpwm::getenv "SHELL")) ; `getenv' is not exported
;; system tray
;; ;; TODO Check if it exists
;; (run-shell-command "which stalonetray && stalonetray")
;; From http://archive.ubuntu.com/ubuntu/pool/universe/t/trayer/
(run-shell-command "/usr/bin/trayer --SetDockType false --transparent true --expand false")
;; (run-shell-command "/usr/bin/trayer")
;; dzen2 -fn fixed -w 600 -ta l -fg '#ffffff' -bg '#006699' -e ''
;; dzen provides customisable status bars
;; 9menu
;; dmenu provides a simple popup menu for launching programs
(define-key *root-map* (kbd "P")
"exec dmenu_run -i -b -p \"run command:\"") ; simple $PATH to run commands
;; (run-shell-command "/usr/bin/gnome-settings-daemon")
;; ;;(run-shell-command "/usr/bin/gnome-panel &")
;; (run-shell-command "/usr/bin/nm-applet &")
;; (run-shell-command "/usr/bin/bluetooth-applet &")
;; (run-shell-command "/usr/bin/pactl load-module module-x11-xsmp &")
;; other programs in the system tray
(run-shell-command "gnome-power-manager")
(run-shell-command "nm-applet --sm-disable") ; network manager
;; (run-shell-command "which mail-notification && mail-notification --sm-disable")
(run-shell-command "which log-event-notify && log-event-notify")
; TODO Install `inotify-tools' and
; `libnotify-bin' for this to work as
; expected
(run-shell-command "emacs")
;; (run-shell-command "urxvt")
(run-shell-command "update-manager")
;; fix volume levels
(run-shell-command "~/bin/volume-control")
;; so i modified my keymap settings so that compaq keys2-4 are mapped to
;; function keys F13-F15 (i only have F1 to F12…)
;;
;; -- .Xmodmap --
;; keycode 160 = F13
;; keycode 174 = F14
;; keycode 176 = F15
;;
;; and my corresponding .fluxbox/keys file
;;
;; -- snip --
;;
;; # laptop keymap
;; F13 :ExecCommand /bin/bash ~/.mykbd
;; F14 :ExecCommand /usr/bin/amixer sset PCM 5%-
;; F15 :ExecCommand /usr/bin/amixer sset PCM 5%+
;;** 11 (info "(stumpwm)Miscellaneous Commands")
;; This forces the user to set the focus into the screen before being able to
;; use the prefix key for the first time!
;; ;; get rid of cursor initially
;; (banish-pointer)
;;*** 11.2 (info "(stumpwm)Debugging StumpWM")
;; turn on debugging (look at `.xsession-errors')
(setf stumpwm::*debug-level* 10) ; get rid of debug by setting level to 0
;;*** 11.4 (info "(stumpwm)Getting Help")
(setf *help-map*
(let ((m (make-sparse-keymap)))
(define-key m (kbd "m") "man")
(define-key m (kbd "i") "info")
(define-key m (kbd "v") "describe-variable")
(define-key m (kbd "f") "describe-function")
(define-key m (kbd "k") "describe-key")
(define-key m (kbd "w") "where-is")
m))
;;** 12 (info "(stumpwm)Hooks")
;; display the key sequence in progress
(defun key-press-hook (key key-seq cmd)
(declare (ignore key))
(unless (eq *top-map* *resize-map*)
(let ((*message-window-gravity* :bottom-right))
(message "Key sequence: ~a" (print-key-seq (reverse key-seq))))
(when (stringp cmd)
;; give 'em time to read it
(sleep 0.5))))
(defmacro replace-hook (hook fn)
`(remove-hook ,hook ,fn)
`(add-hook ,hook ,fn))
(replace-hook *key-press-hook* 'key-press-hook)
;;** Prefix Key
;; I tend to place "system-wide" window manager shortcut keys consistently
;; on Super-<something> rather than the horrible defaults that can get in
;; the way of Emacs' use (various Control and Alt bindings).
;; same as `keycode 133 = F20' in `~/.Xmodmap', `133' (TO BE CHECKED WITH
;; `xev') being the left "Windows" key, aka `Super_L'
;; (run-shell-command "xmodmap -e 'keycode 133 = F20'" t)
;; change the prefix key
(set-prefix-key (kbd "ISO_Level3_Shift")) ;; `Alt Gr'
;; This is for the sake of Emacs.
;; Local Variables:
;; coding: utf-8
;; mode: emacs-lisp
;; mode: outline-minor
;; ispell-local-dictionary: "en_US"
;; End:
;;; .stumpwmrc ends here