style(config): Reformat Emacs Lisp code for consistency

Standardize formatting across multiple init files: expand
single-line use-package keywords onto separate lines, fix
indentation, remove outdated comments, and clean up whitespace. Also
adds mc/keymap <return> binding and improves fcitx5 startup logic in
EXWM.
This commit is contained in:
2026-05-11 03:40:06 +08:00
parent 71a57a6922
commit aa4dea523e
11 changed files with 89 additions and 67 deletions

View File

@@ -14,7 +14,7 @@
(let ((display-buffer-alist
'((".*" . (display-buffer-no-window . nil)))))
(async-shell-command command))))
(defun restart-fcitx5 ()
"Kill and restart fcitx5, to fix random issues in exwm."
(interactive)
@@ -117,6 +117,7 @@
(use-package desktop-environment
:init
(desktop-environment-mode)
:config
(advice-add 'desktop-environment-screenshot :after
(lambda (&rest _) (message "Saved fullscreen screenshot.")))
@@ -131,22 +132,26 @@
(add-hook 'exwm-init-hook
(lambda ()
(unless (zerop (shell-command "pgrep -x fcitx5"))
(start-process-shell-command "fcitx5" nil "fcitx5 -d"))
(if (zerop (shell-command "pgrep -x fcitx5"))
(restart-fcitx5)
(start-process-shell-command "fcitx5" nil "fcitx5 -d"))
(unless (zerop (shell-command "pgrep -x mihomo"))
(start-process-shell-command "mihomo" nil "mihomo -d ~/.config/mihomo/"))
(start-process-shell-command "xrandr-refresh" nil "xrandr --output DP-4 --mode 2560x1440 --rate 165.00")
(start-process-shell-command "xinput" nil "xinput set-prop 12 'libinput Accel Speed' -0.45")))
(use-package xdg-launcher
:straight (xdg-launcher :type git
:host github
:repo "emacs-exwm/xdg-launcher")
:bind (("s-SPC" . xdg-launcher-run-app))
:init (with-eval-after-load 'consult
(unless (memq 'xdg-launcher-consult-source consult-buffer-sources)
(setq consult-buffer-sources
(append consult-buffer-sources '(xdg-launcher-consult-source))))))
:straight
(xdg-launcher :type git
:host github
:repo "emacs-exwm/xdg-launcher")
:bind
(("s-SPC" . xdg-launcher-run-app))
:init
(with-eval-after-load 'consult
(unless (memq 'xdg-launcher-consult-source consult-buffer-sources)
(setq consult-buffer-sources
(append consult-buffer-sources '(xdg-launcher-consult-source))))))
)
(provide 'init-exwm)