This repository has been archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.stumpwmrc
82 lines (72 loc) · 3.14 KB
/
.stumpwmrc
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
;; 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")
(swank-loader:init)
(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