summaryrefslogtreecommitdiff
path: root/exwm.el
diff options
context:
space:
mode:
authorthing1 <thing1@seacrossedlovers.xyz>2025-04-01 18:10:15 +0000
committerthing1 <thing1@seacrossedlovers.xyz>2025-04-01 18:10:15 +0000
commitdabaff03992c102c395314629f63ce93a2c1bd3a (patch)
tree990472507186637085165b7cbbf7abf15c10889a /exwm.el
init commit
Diffstat (limited to 'exwm.el')
-rw-r--r--exwm.el34
1 files changed, 34 insertions, 0 deletions
diff --git a/exwm.el b/exwm.el
new file mode 100644
index 0000000..3238750
--- /dev/null
+++ b/exwm.el
@@ -0,0 +1,34 @@
+;;; -*- lexical-binding: t -*-
+(custom-set-variables
+ ;; custom-set-variables was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(package-selected-packages '(exwm)))
+(custom-set-faces
+ ;; custom-set-faces was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ )
+(require 'exwm)
+;; Set the initial workspace number.
+(setq exwm-workspace-number 4)
+;; Make class name the buffer name.
+(add-hook 'exwm-update-class-hook
+ (lambda () (exwm-workspace-rename-buffer exwm-class-name)))
+;; Global keybindings.
+(setq exwm-input-global-keys
+ `(([?\s-r] . exwm-reset) ;; s-r: Reset (to line-mode).
+ ([?\s-w] . exwm-workspace-switch) ;; s-w: Switch workspace.
+ ([?\s-&] . (lambda (cmd) ;; s-&: Launch application.
+ (interactive (list (read-shell-command "$ ")))
+ (start-process-shell-command cmd nil cmd)))
+ ;; s-N: Switch to certain workspace.
+ ,@(mapcar (lambda (i)
+ `(,(kbd (format "s-%d" i)) .
+ (lambda ()
+ (interactive)
+ (exwm-workspace-switch-create ,i))))
+ (number-sequence 0 9))))
+(exwm-enable)