source: dotfiles/wm/.stumpwmrc@ 2b2c1ba

Last change on this file since 2b2c1ba was 2b2c1ba, checked in by Mikhail Kirillov <w96k@…>, on Jan 13, 2020 at 11:32:34 PM

Change font in stump and emacs

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