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
|
;;; $DOOMDIR/+exwm.el -*- lexical-binding: t; -*-
(when (getenv "USE_EXWM")
(use-package! exwm
:config
(require 'exwm-randr)
(exwm-randr-enable)
(setq exwm-manage-configurations
'(((string= exwm-class-name "confirmreset") floating t)
((string= exwm-class-name "makebranch") floating t)
((string= exwm-class-name "maketag") floating t)
((string= exwm-class-name "ssh-askpass") floating t)
((string= exwm-class-name "Blueman-manager") floating t)
((string= exwm-class-name "Pavucontrol") floating t)
((string= exwm-title "branchdialog") floating t)
((string= exwm-title "pinentry") floating t)))
(setq exwm-input-prefix-keys '(?\s-x))
(setq exwm-input-global-keys
`((,(kbd "s-<return>") . (lambda () (interactive) (start-process-shell-command "term" nil "alacritty")))
(,(kbd "s-p") . (lambda () (interactive) (start-process-shell-command "dmenu" nil "j4-dmenu-desktop")))
(,(kbd "s-c") . (lambda () (interactive) (start-process-shell-command "emacs" nil "emacs")))
(,(kbd "s-t") . (lambda () (interactive) (start-process-shell-command "thunderbird" nil "thunderbird")))
(,(kbd "s-w") . (lambda () (interactive) (start-process-shell-command "vivaldi" nil "vivaldi")))
(,(kbd "s-e") . (lambda () (interactive) (start-process-shell-command "thunar" nil "thunar")))
(,(kbd "s-s") . (lambda () (interactive) (start-process-shell-command "vesktop" nil "vesktop")))
(,(kbd "s-x") . (lambda () (interactive) (start-process-shell-command "lock" nil "loginctl lock-session")))
(,(kbd "s-m") . (lambda () (interactive) (start-process-shell-command "ncmpcpp" nil "alacritty -e ncmpcpp")))
(,(kbd "<print>") . (lambda () (interactive) (start-process-shell-command "screenshot" nil "screenshot")))
(,(kbd "S-<print>") . (lambda () (interactive) (start-process-shell-command "screenrecord" nil "screenrecord")))
(,(kbd "s-S-s") . (lambda () (interactive) (start-process-shell-command "screenshot-select" nil "screenshot select")))
(,(kbd "s-S-r") . (lambda () (interactive) (start-process-shell-command "screenrecord-select" nil "screenrecord select")))
(,(kbd "s-q") . kill-buffer)
(,(kbd "s-f") . exwm-layout-toggle-fullscreen)
(,(kbd "s-.") . exwm-workspace-switch-create)
(,(kbd "<XF86AudioRaiseVolume>") . (lambda () (interactive) (start-process-shell-command "vol-up" nil "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+")))
(,(kbd "<XF86AudioLowerVolume>") . (lambda () (interactive) (start-process-shell-command "vol-down" nil "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-")))
(,(kbd "<XF86AudioMute>") . (lambda () (interactive) (start-process-shell-command "vol-mute" nil "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle")))
(,(kbd "<XF86AudioPlay>") . (lambda () (interactive) (start-process-shell-command "play" nil "playerctl play-pause")))
(,(kbd "<XF86AudioNext>") . (lambda () (interactive) (start-process-shell-command "next" nil "playerctl next")))
(,(kbd "<XF86AudioPrev>") . (lambda () (interactive) (start-process-shell-command "prev" nil "playerctl previous")))
(,(kbd "<XF86AudioStop>") . (lambda () (interactive) (start-process-shell-command "stop" nil "playerctl stop")))
(,(kbd "<XF86MonBrightnessUp>") . (lambda () (interactive) (start-process-shell-command "bright-up" nil "brightnessctl set +5%")))
(,(kbd "<XF86MonBrightnessDown>") . (lambda () (interactive) (start-process-shell-command "bright-down" nil "brightnessctl set 5%-")))))
(use-package! edwina
:config
(edwina-mode 1)
(setq exwm-input-global-keys
(append exwm-input-global-keys
`((,(kbd "s-j") . edwina-select-next-window)
(,(kbd "s-k") . edwina-select-previous-window)
(,(kbd "s-h") . edwina-dec-mfact)
(,(kbd "s-l") . edwina-inc-mfact)
(,(kbd "s-S-h") . edwina-dec-nmaster)
(,(kbd "s-S-l") . edwina-inc-nmaster)
(,(kbd "s-<tab>") . edwina-cycle-layout)))))
(exwm-enable)))
|