source: dotfiles/wm/.stumpwmrc@ 42ee519

Last change on this file since 42ee519 was 42ee519, checked in by Mikhail Kirillov <w96k@…>, on Jan 6, 2020 at 8:32:05 PM

Update visual style of wm.

  • Property mode set to 100644
File size: 4.1 KB
Line 
1(in-package :stumpwm)
2(load "~/quicklisp/setup.lisp")
3
4(setq *startup-message* "Welcome to your lovely LISP-machine")
5
6;; Shepherd (with emacs daemon)
7(run-shell-command "shepherd")
8
9(set-prefix-key (kbd "C-t"))
10
11(set-module-dir "~/stumpwm/contrib")
12(ql:quickload :clx-truetype)
13
14(load-module "battery-portable")
15(load-module "cpu")
16(load-module "mem")
17(load-module "command-history")
18(load-module "clipboard-history")
19(load-module "shell-command-history")
20(load-module "app-menu")
21;;(load-module "screenshot")
22(load-module "ttf-fonts")
23
24(clx-truetype:cache-fonts)
25
26(setf *mode-line-pad-x* 20
27 *mode-line-pad-y* 8
28 *mode-line-timeout* 1
29 *mouse-focus-policy* :click
30 *window-border-style* :thin
31 *message-window-gravity* :center
32 *normal-border-width* 8
33 *mode-line-border-width* 0
34 *transient-border-width* 0
35 *mode-line-position* :top
36 *window-format* "%m%n%s%t "
37 *hidden-window-color* ""
38 *cpu-modeline-fmt* "%C"
39 *mode-line-background-color* "#2d2d2d"
40 *startup-mode-line* t
41 *window-name-source* :class
42 *delim* " ^2::^7 "
43
44 *screen-mode-line-format* (list
45 ;; Windows
46 ;;"[^4%n^b]"
47 "^7%v ^>^7"
48 ;; CPU
49 "%C" *delim*
50 ;; RAM
51 "%M" *delim*
52 ;; Battery
53 "%B" *delim*
54 ;; Date
55 "%d"
56 ))
57
58;; Colors
59(set-bg-color "#1C2028")
60(set-border-color "#666666")
61(set-focus-color "#6699cc")
62(set-unfocus-color "#2d2d2d")
63(set-win-bg-color "#2d2d2d")
64
65
66;; launch Web browser
67(defcommand next () ()
68 "Start Next or switch to it, if it is already running."
69 (run-or-raise "next" '(:class "Next")))
70(define-key *root-map* (kbd "B") "next")
71
72(defcommand icecat () ()
73 "Start Next or switch to it, if it is already running."
74 (run-or-raise "icecat" '(:class "IceCat")))
75(define-key *root-map* (kbd "b") "icecat")
76
77;; launch terminal
78(defcommand urxvt () ()
79 "Start Urxvt or switch to it, if it is already running."
80 (run-or-raise "urxvt" '(:class "Urxvt")))
81(define-key *root-map* (kbd "c") "urxvt")
82
83;; Change xterm to urxvt
84(define-key *root-map* (kbd "C") "exec urxvt")
85
86;; Change emacs to emacsclient
87(defcommand emacsclient () ()
88 "Start Urxvt or switch to it, if it is already running."
89 (run-or-raise "emacsclient -c -a emaces" '(:class "Emacs")))
90(define-key *root-map* (kbd "e") "emacsclient -c -a emaces")
91
92;; Volume Management
93(progn
94 (define-key *top-map* (kbd "XF86AudioLowerVolume") "exec amixer -q sset Master 3%-")
95 (define-key *top-map* (kbd "XF86AudioRaiseVolume") "exec amixer -q sset Master 3%+")
96 (define-key *top-map* (kbd "XF86AudioMute") "amixer -q sset Master toggle"))
97
98;; Mode-line
99(enable-mode-line (current-screen) (current-head) t)
100
101
102;; Gaps
103(load-module "swm-gaps")
104(setf swm-gaps:*inner-gaps-size* 8)
105(setf swm-gaps:*outer-gaps-size* 4)
106(swm-gaps:toggle-gaps)
107
108;; Golden Ratio
109;;(load-module "swm-golden-ratio")
110;;(swm-golden-ratio:toggle-golden-ratio)
111
112(setf (getenv "GDK_CORE_DEVICE_EVENTS") "1")
113
114(defun key-press-hook (key key-seq cmd)
115 (let ((*message-window-gravity* :bottom))
116 (message-no-timeout "Key sequence: ~A"
117 (print-key-seq (reverse key-seq))))
118 (when (stringp cmd)
119 (sleep 0.1)))
120
121(defmacro replace-hook (hook fn)
122 `(remove-hook ,hook ,fn)
123 `(add-hook ,hook ,fn))
124
125(replace-hook *key-press-hook* 'key-press-hook)
126
127;; Clipboard history
128(define-key *root-map* (kbd "C-y") "show-clipboard-history")
129(clipboard-history:start-clipboard-manager)
130
131;; Shell history
132(setf shell-command-history:*shell-command-history-file*
133 "/home/w96k/.cache/stumpwm/shell-command-history")
134
135;; Menu
136(setq app-menu:*app-menu*
137 '(("Telegram" "telegram-desktop")
138 ("Icecat" icecat)
139 ("Next" next)
140 ("Terminal" urxvt)
141 ("Deluge" "deluge")))
142
143(define-key *root-map* (kbd "q") "show-menu")
Note: See TracBrowser for help on using the repository browser.