EXWM: Move config of exwm to use-package config section

- + move found-custom-arg to 'Utils' section.
This commit is contained in:
Laurens Miers 2019-04-19 15:46:34 +02:00
parent 794973b051
commit 4906b9da53

View file

@ -24,29 +24,35 @@ This configuration requires the installation of :
When first checking out this config, run =irony-install-server= to make and install the irony-server.
* EXWM
* Utils
** Custom command line arguments
Return if a custom command line arguments was found.
If it was found, we delete it from the list of command line arguments.
#+BEGIN_SRC emacs-lisp
(defun found-custom-arg (switch)
(let ((found-switch (member switch command-line-args)))
(setq command-line-args (delete switch command-line-args))
found-switch))
#+END_SRC
(use-package exwm
:ensure t
)
* EXWM
Arandr config is still too static, should find a way to simplify this.
#+BEGIN_SRC emacs-lisp
(if (found-custom-arg "-start_wm")
(progn
(message "Loading EXWM...")
(require 'exwm)
(require 'exwm-config)
(require 'exwm-randr)
;; systray not working?
(use-package exwm
:ensure t
:config
(require 'exwm-systemtray)
(exwm-systemtray-enable)
(require 'exwm-randr)
(setq exwm-workspace-number 2)
(setq exwm-randr-workspace-output-plist
@ -57,7 +63,7 @@ When first checking out this config, run =irony-install-server= to make and inst
"xrandr" nil "xrandr --output DP2 --primary --mode 1920x1080 --pos 1920x0 --rotate left --output DP1 --mode 1920x1080 --pos 0x0 --rotate normal --auto")))
(exwm-randr-enable)
(require 'exwm-config)
;; Make class name the buffer name
(add-hook 'exwm-update-class-hook
@ -70,7 +76,7 @@ When first checking out this config, run =irony-install-server= to make and inst
([?\s-r] . exwm-reset)
;; 's-w': Switch workspace.
([?\s-w] . exwm-workspace-switch)
;; 's-&': Launch application.
;; 's-return': Launch application.
([s-return] . (lambda (command)
(interactive (list (read-shell-command "$ ")))
(start-process-shell-command command nil command)))
@ -100,6 +106,7 @@ When first checking out this config, run =irony-install-server= to make and inst
;; Enable EXWM
(exwm-enable)
)
)
)
#+END_SRC