- (kill-buffer (current-buffer))))
- ([?\s-Q] . (lambda ()
- (interactive)
- (exwm-manage--kill-client)))
- ([?\s-\'] . (lambda ()
- (interactive)
- (start-process-shell-command
- "rofi-light" nil "rofi-light")))
- ([XF86AudioMute] .
- (lambda ()
- (interactive)
- (start-process "" nil "amixer" "set" "'Master',0" "toggle")))
- ([XF86AudioLowerVolume] .
- (lambda ()
- (interactive)
- (start-process
- "" nil "amixer" "set" "'Master',0" "5%-")))
- ([XF86AudioRaiseVolume] .
- (lambda ()
- (interactive)
- (start-process
- "" nil "amixer" "set" "'Master',0" "5%+")))
- ([XF86AudioPlay] .
- (lambda ()
- (interactive)
- (start-process "" nil "mpc" "toggle")))
- ([XF86AudioPrev] .
- (lambda ()
- (interactive)
- (start-process "" nil "mpc" "prev")))
- ([XF86AudioNext] .
- (lambda ()
- (interactive)
- (start-process "" nil "mpc" "next")))
- ([XF86ScreenSaver] .
- (lambda ()
- (interactive)
- (start-process "" nil "dm-tool" "lock")))
- ([\s-XF86Back] . previous-buffer)
- ([\s-XF86Forward] . next-buffer)))
-
- ;; Line-editing shortcuts
- (setq exwm-input-simulation-keys
- '(;; movement
- ([?\C-b] . [left])
- ([?\M-b] . [C-left])
- ([?\C-f] . [right])
- ([?\M-f] . [C-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])
- ([?\M-<] . C-home)
- ([?\M->] . C-end)
- ;; cut/copy/paste
- ([?\C-w] . [?\C-x])
- ([?\M-w] . [?\C-c])
- ([?\C-y] . [?\C-v])
- ([?\M-d] . [C-S-right ?\C-x])
- ([?\M-\d] . [C-S-left ?\C-x])
- ;; window
- ([?\s-w] . [?\C-w])
- ([?\s-q] . [?\C-q])
- ;; misc
- ([?\C-s] . [?\C-f])
- ([?\s-s] . [?\C-s])
- ([?\C-g] . [escape]))))
-
-(use-package exwm-manage
- :demand
- :after exwm
- :hook
- (exwm-manage-finish . (lambda ()
- (when exwm-class-name
- (cond
- ((string= exwm-class-name "IceCat")
- (exwm-input-set-local-simulation-keys
- `(,@exwm-input-simulation-keys
- ([?\C-\S-d] . [?\C-d]))))
- ((string= exwm-class-name "URxvt")
- (exwm-input-set-local-simulation-keys
- '(([?\C-c ?\C-c] . [?\C-c])
- ([?\C-c ?\C-u] . [?\C-u]))))
- ((string= exwm-class-name "Zathura")
- (exwm-input-set-local-simulation-keys
- '(([?\C-p] . [C-up])
- ([?\C-n] . [C-down])))))))))
-
-(use-package exwm-randr
- :demand
- :after exwm
- :config
- (exwm-randr-enable)
- :custom
- (exwm-randr-workspace-monitor-plist '(1 "VGA-1")))
-
-(use-package exwm-systemtray
- :demand
- :after exwm
- :config
- (exwm-systemtray-enable))
-
-(use-package exwm-workspace)
-
-(use-package exwm-edit
- :demand
- :after exwm)
+ (start-process-shell-command
+ "rofi-light" nil "rofi-light")))
+ ([XF86AudioMute] . ; borken on my X200 :-(
+ (lambda ()
+ (interactive)
+ (start-process "" nil "pamixer" "--toggle-mute")))
+ ([XF86Launch1] .
+ (lambda ()
+ (interactive)
+ (start-process "" nil "pamixer" "--toggle-mute")))
+ ([\s-XF86Launch1] . ; toggle mic mute
+ (lambda ()
+ (interactive)
+ (start-process
+ "" nil "pamixer" "--default-source" "--toggle-mute")))
+ ([XF86AudioLowerVolume] .
+ (lambda ()
+ (interactive)
+ (start-process
+ "" nil "pamixer" "--allow-boost" "--decrease" "5")))
+ ([XF86AudioRaiseVolume] .
+ (lambda ()
+ (interactive)
+ (start-process
+ "" nil "pamixer" "--allow-boost" "--increase" "5")))
+ ([XF86AudioPlay] .
+ (lambda ()
+ (interactive)
+ (start-process "" nil "mpc" "toggle")))
+ ([XF86AudioPrev] .
+ (lambda ()
+ (interactive)
+ (start-process "" nil "mpc" "prev")))
+ ([XF86AudioNext] .
+ (lambda ()
+ (interactive)
+ (start-process "" nil "mpc" "next")))
+ ([XF86MonBrightnessDown] .
+ (lambda ()
+ (interactive)
+ (start-process "" nil "light" "-U" "5")))
+ ([XF86MonBrightnessUp] .
+ (lambda ()
+ (interactive)
+ (start-process "" nil "light" "-A" "5")))
+ ([XF86ScreenSaver] .
+ (lambda ()
+ (interactive)
+ (start-process "" nil "dm-tool" "lock")))
+ ([\s-XF86Back] . previous-buffer)
+ ([\s-XF86Forward] . next-buffer)))
+
+;; Line-editing shortcuts
+(csetq exwm-input-simulation-keys
+ '(;; movement
+ ([?\C-b] . [left])
+ ([?\M-b] . [C-left])
+ ([?\C-f] . [right])
+ ([?\M-f] . [C-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])
+ ([?\M-<] . C-home)
+ ([?\M->] . C-end)
+ ;; cut/copy/paste
+ ([?\C-w] . [?\C-x])
+ ([?\M-w] . [?\C-c])
+ ([?\C-y] . [?\C-v])
+ ([?\M-d] . [C-S-right ?\C-x])
+ ([?\M-\d] . [C-S-left ?\C-x])
+ ;; window
+ ([?\s-w] . [?\C-w])
+ ([?\s-q] . [?\C-q])
+ ;; misc
+ ([?\C-s] . [?\C-f])
+ ([?\s-s] . [?\C-s])
+ ([?\C-g] . [escape])))
+
+(require 'exwm-manage)
+(csetq
+ exwm-manage-configurations
+ '(((equal exwm-instance-name "floating")
+ floating t
+ floating-mode-line nil)))
+(add-hook 'exwm-manage-finish-hook
+ (lambda ()
+ (when exwm-class-name
+ (cond
+ ((member exwm-class-name '("Abrowser" "IceCat" "Iceweasel"))
+ (exwm-input-set-local-simulation-keys
+ `(,@exwm-input-simulation-keys
+ ([?\C-\S-d] . [?\C-d]))))
+ ((member exwm-class-name '("URxvt" "Mate-terminal"))
+ (exwm-input-set-local-simulation-keys
+ '(([?\C-c ?\C-c] . [?\C-c])
+ ([?\C-c ?\C-u] . [?\C-u]))))
+ ((string= exwm-class-name "Zathura")
+ (exwm-input-set-local-simulation-keys
+ '(([?\C-p] . [C-up])
+ ([?\C-n] . [C-down]))))))))
+
+(require 'exwm-randr)
+(csetq
+ exwm-randr-workspace-monitor-plist
+ '(0 "eDP-1"
+ 1 "eDP-1" 2 "eDP-1" 3 "eDP-1"
+ 4 "eDP-1" 5 "eDP-1" 6 "eDP-1"
+ 7 "HDMI-1" 8 "HDMI-1" 9 "HDMI-1"))
+;; (add-hook
+;; 'exwm-randr-screen-change-hook
+;; (lambda ()
+;; (start-process-shell-command
+;; "xrandr" nil
+;; "xrandr --output HDMI-1 --mode 1280x720 --above eDP-1 --auto")))
+(exwm-randr-enable)
+
+(require 'exwm-systemtray)
+(exwm-systemtray-enable)
+
+(add-to-list 'load-path (b/lisp "exwm-edit"))
+(require 'exwm-edit)