forked from re5et/.dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.stumpwmrc
115 lines (92 loc) · 4 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
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
;; ;; -*-Lisp-*-
(in-package :stumpwm)
(setq *shell-program* (stumpwm::getenv "SHELL"))
(stumpwm:set-prefix-key (stumpwm:kbd "C-h"))
;; ;; 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.
;; ;; (load "/home/atom/stumpwm/contrib/mem.lisp")
;; ;; (load "/home/atom/stumpwm/contrib/net.lisp")
;; ;; (load "/home/atom/stumpwm/contrib/battery.lisp")
;; ;; (load "/home/atom/stumpwm/contrib/disk.lisp")
;; ;; (load "/home/atom/stumpwm/contrib/cpu.lisp")
(setf
*mouse-focus-policy* :ignore
*message-window-gravity* :top-left
*input-window-gravity* :bottom-left
*mode-line-timeout* 1
*mode-line-pad-y* 0
*mode-line-background-color* "black"
*mode-line-foreground-color* "gray20"
*mode-line-border-color* "gray20"
*screen-mode-line-format* (list
'(:eval (run-shell-command "~/bin/modeline" t))
" %W"
))
(set-focus-color "black")
;; emacs style splitting
(define-key *root-map* (kbd "0") "remove")
(define-key *root-map* (kbd "1") "only")
(define-key *root-map* (kbd "2") "vsplit")
(define-key *root-map* (kbd "3") "hsplit")
(define-key *root-map* (kbd "C-B") "prev-in-frame")
(define-key *root-map* (kbd "C-F") "next-in-frame")
(define-key *root-map* (kbd "t") "exec sakura")
(define-key *root-map* (kbd "S-Left") "move-window left")
(define-key *root-map* (kbd "S-Right") "move-window right")
(define-key *root-map* (kbd "!") "exec dmenu_run -i -b -nb '#000' -nf '#0F0' -sb '#111' -sf '#F0F' -fn '-*-helvetica-bold-r-*-*-20-*-*-*-*-*-*-*'")
;; top level commands
(define-key *top-map* (kbd "C-S-RET") "fullscreen")
(define-key *top-map* (kbd "C-M-RET") "exec xscreensaver-command -lock")
(define-key *top-map* (kbd "C-:") "pull-hidden-next")
(define-key *top-map* (kbd "C-\"") "pull-hidden-previous")
(define-key *top-map* (kbd "C-;") "next")
(define-key *top-map* (kbd "C-'") "prev")
(define-key *top-map* (kbd "C-M-;") "colon")
;; volume control
(define-key *top-map* (kbd "C-Up") "exec amixer -c 0 set Master 4dB+")
(define-key *top-map* (kbd "C-Down") "exec amixer -c 0 set Master 4dB-")
;; mpc stuff
(define-key *root-map* (kbd "C-p") "exec emacsclient -e '(emms-pause)'")
;; (defvar *mpc-bindings*
;; (let ((m (make-sparse-keymap)))
;; (define-key m (kbd "f") "exec mpc next")
;; (define-key m (kbd "b") "exec mpc prev")
;; m ; NOTE: this is important
;; ))
;; (define-key *root-map* (kbd "m") '*mpc-bindings*)
;(load "/home/atom/stumpwm/contrib/notifications.lisp")
;(define-key *root-map* (kbd "n") '*notifications-map*)
;; get around groups easier
(define-key *top-map* (kbd "C-1") "gselect Default")
(define-key *top-map* (kbd "C-2") "gselect trash")
(defcommand firefox () ()
"Start Firefox or switch to it, if it is already running."
(run-or-raise "firefox" '(:role "browser")))
(define-key *root-map* (kbd "f") "firefox")
(defcommand chromium () ()
"Start Chromium or switch to it, if it is already running."
(run-or-raise "chromium-browser" '(:class "Chromium-browser")))
(define-key *root-map* (kbd "c") "chromium")
(defcommand emacs () ()
"Start emacs or switch to it, if it is already running."
(run-or-raise "emacsclient -c" '(:title "emacs")))
(define-key *root-map* (kbd "e") "emacs")
(defcommand emux () ()
"Start emux or switch to it, if it is already running."
(run-or-raise "emacsclient -e '(start-emux)'" '(:title "emux")))
(define-key *root-map* (kbd "s") "emux")
(defcommand xbmc () ()
"Start xbmc or switch to it, if it is already running."
(run-or-raise "xbmc.bin" '(:class "xbmc.bin")))
(define-key *root-map* (kbd "d") "xbmc")
(run-commands "exec emacs --daemon")
(emacs)
(emux)
(firefox)
;; make my default groups
(run-commands "gnew trash")