Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
83 lines (72 sloc) 3.14 KB
;; My key bindings
(in-package stumpwm)
(define-key stumpwm:*top-map* (stumpwm:kbd "F12") "mode-line")
;; switching window
(define-key stumpwm:*top-map* (stumpwm:kbd "M-Up") "pull-hidden-previous")
(define-key stumpwm:*top-map* (stumpwm:kbd "M-Down") "pull-hidden-next")
;; switching frames
(define-key *top-map* (kbd "M-Page_Down") "fnext")
;; switching groups
(define-key stumpwm:*top-map* (stumpwm:kbd "M-Left") "gprev")
(define-key stumpwm:*top-map* (stumpwm:kbd "M-Right") "gnext")
(define-key stumpwm:*top-map* (stumpwm:kbd "M-F1") "gselect 1")
(define-key stumpwm:*top-map* (stumpwm:kbd "M-F2") "gselect 2")
(define-key stumpwm:*top-map* (stumpwm:kbd "M-F3") "gselect 3")
(define-key stumpwm:*top-map* (stumpwm:kbd "M-F4") "gselect 4")
(define-key stumpwm:*top-map* (stumpwm:kbd "M-F5") "gselect 5")
;; splits
(define-key stumpwm:*top-map* (stumpwm:kbd "M-s") "vsplit")
(define-key stumpwm:*top-map* (stumpwm:kbd "M-S") "hsplit")
(define-key stumpwm:*top-map* (stumpwm:kbd "M-q") "only")
(define-key stumpwm:*top-map* (stumpwm:kbd "M-r") "remove")
;; programs
(define-key stumpwm:*top-map* (stumpwm:kbd "M-c") "exec xfce4-terminal")
(define-key stumpwm:*top-map* (stumpwm:kbd "M-F") "exec firefox-2")
;; mouse
(setf *mouse-focus-policy* :sloppy)
;; wallpaper
(stumpwm:run-shell-command "display -window root '/home/joel/data/pics/pics celebs/Wallpapers/1024x728/TweetyDark.jpg'")
;; Multimedia Keys
(load "/home/joel/repository/stumpwm-goodies/multimedia-keys.lisp")
; Brightness Adjust (Fn + Up/Down)
(run-shell-command "xmodmap -e \'keycode 212 = XF86LaunchE'")
(run-shell-command "xmodmap -e \'keycode 101 = XF86LaunchD'")
(define-key stumpwm:*top-map* (stumpwm:kbd "XF86LaunchE") "exec brightness +")
(define-key stumpwm:*top-map* (stumpwm:kbd "XF86LaunchD") "exec brightness -")
;; Load Mode line
(load "/home/joel/repository/stumpwm-goodies/mode-line/modeline-config.lisp")
;; Modeline Group Scrolling
(setf stumpwm:*mode-line-click-hook*
(list (lambda (&rest args)
(cond ((eq (second args) 5)
(run-commands "gnext"))
((eq (second args) 4)
(run-commands "gprev"))))))
;; Theming
(load "/home/joel/repository/stumpwm-goodies/effects.lisp")
;; Male's code for key sequence display
(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))))
(defmacro replace-hook (hook fn)
`(remove-hook ,hook ,fn)
`(add-hook ,hook ,fn))
(replace-hook *key-press-hook* 'key-press-hook)
;; Swank
(load "/home/joel/repository/slime/swank-loader.lisp")
(defcommand swank () ()
(setf stumpwm:*top-level-error-action* :break)
(swank:create-server :port 4005
:style swank:*communication-style*
:dont-close t)
(echo-string (current-screen) "Starting swank."))
(define-key *root-map* (kbd "C-s") "swank")
;; TODO: Print screen
;; TODO: key mappings for rest