blob: a659740ef7181bc01021a87addfea32f68017203 (
plain)
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
|
(require 'exwm)
(require 'exwm-config)
(require 'exwm-systemtray)
(exwm-systemtray-enable)
(setq exwm-input-simulation-keys
'(([?\C-b] . [left])
([?\C-f] . [right])
([?\C-p] . [up])
([?\C-n] . [down])
([?\C-a] . [home])
([?\C-e] . [end])
([?\M-v] . [prior])
([?\C-v] . [next])
([?\C-d] . [delete])
([?\C-k] . [S-end C-x])
([?\C-s] . [C-f])
([?\C-y] . [C-v])
([?\C-w] . [C-x])
([?\M-w] . [C-c])))
(put 'exwm-input-simulation-keys 'saved-value t)
(require 'exwm-edit)
(add-hook 'exwm-edit-compose-hook
(lambda () (funcall 'markdown-mode)))
(call-process-shell-command "setxkbmap -option ctrl:nocaps")
(defun truncate-exwm-title (s)
(if (<= (string-width s) 49)
s
(truncate-exwm-title (substring s 0 -1))))
(defun exwm-rename-buffer ()
(interactive)
(exwm-workspace-rename-buffer
(concat exwm-class-name ":"
(if (or (not (stringp exwm-title))
(<= (string-width exwm-title) 50))
exwm-title
(concat (truncate-exwm-title exwm-title) "…")))))
(add-hook 'exwm-update-class-hook 'exwm-rename-buffer)
(add-hook 'exwm-update-title-hook 'exwm-rename-buffer)
(exwm-config-example)
|