My personal dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.exwm.el 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. (use-package exwm
  2. :config
  3. (require 'exwm-config))
  4. ;; Set the initial workspace number.
  5. (setq exwm-workspace-number 4)
  6. ;; Make class name the buffer name
  7. (add-hook 'exwm-update-class-hook
  8. (lambda ()
  9. (exwm-workspace-rename-buffer exwm-class-name)))
  10. ;; 's-r': Reset
  11. (exwm-input-set-key (kbd "s-r") #'exwm-reset)
  12. ;; 's-w': Switch workspace
  13. (exwm-input-set-key (kbd "s-w") #'exwm-workspace-switch)
  14. ;; 's-N': Switch to certain workspace
  15. (let ((workspace-list '("&" "[" "{" "}" "(" "=" "*" ")" "+" "]")))
  16. (dotimes (i 10)
  17. (exwm-input-set-key (kbd (format "s-%s" (nth i workspace-list)))
  18. `(lambda ()
  19. (interactive)
  20. (exwm-workspace-switch-create ,i)))))
  21. ;; 's-&': Launch application
  22. (exwm-input-set-key (kbd "s-SPC")
  23. (lambda (command)
  24. (interactive (list (read-shell-command "$ ")))
  25. (start-process-shell-command command nil command)))
  26. ;; Line-editing shortcuts
  27. (setq exwm-input-simulation-keys
  28. '(([?\C-b] . [left])
  29. ([?\C-f] . [right])
  30. ([?\C-p] . [up])
  31. ([?\C-n] . [down])
  32. ([?\C-a] . [home])
  33. ([?\C-e] . [end])
  34. ([?\M-v] . [prior])
  35. ([?\C-v] . [next])
  36. ([?\C-d] . [delete])
  37. ([?\C-k] . [S-end delete])))
  38. ;; Enable EXWM
  39. (exwm-enable)
  40. ;; Other configurations
  41. (fringe-mode 1)