feat: Add SLY Common Lisp support and refine EXWM configuration
- Add SLY package with custom keybindings and ibuffer groups Replace - removed power commands with consolidated `my-desktop-init` Add - Emacs key simulation for EXWM windows Enable mouse drag-and-drop - for Dired Disable display-time on Linux/Android Rebind window - resize to C-M-arrow keys
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
(when *is-linux*
|
||||
(use-package exwm
|
||||
:config
|
||||
(setq pop-up-windows nil)
|
||||
(setq exwm-workspace-number 1)
|
||||
(exwm-input-set-key (kbd "s-&")
|
||||
(lambda (command)
|
||||
@@ -24,21 +25,6 @@
|
||||
(eshell-command "fcitx5 -d"))
|
||||
(eshell-command "fcitx5 -d")))
|
||||
|
||||
(defun reboot ()
|
||||
"Execute loginctl reboot command."
|
||||
(interactive)
|
||||
(eshell-command "loginctl reboot"))
|
||||
|
||||
(defun poweroff ()
|
||||
"Execute loginctl poweroff command"
|
||||
(interactive)
|
||||
(eshell-command "loginctl poweroff"))
|
||||
|
||||
(defun suspend ()
|
||||
"Execute loginctl suspend command"
|
||||
(interactive)
|
||||
(eshell-command "loginctl suspend"))
|
||||
|
||||
(defun my--exwm-switch-to-workspace (delta)
|
||||
(let ((target
|
||||
(mod (+ exwm-workspace-current-index delta)
|
||||
@@ -83,7 +69,6 @@
|
||||
XF86AudioRaiseVolume
|
||||
XF86AudioMute
|
||||
))
|
||||
|
||||
(define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key)
|
||||
|
||||
(setq exwm-input-global-keys
|
||||
@@ -96,6 +81,7 @@
|
||||
([?\s-s] . desktop-environment-screenshot-part)
|
||||
([?\s-w] . exwm-workspace-switch)
|
||||
([?\s-o] . other-window)
|
||||
([?\s-m] . exwm-layout-toggle-mode-line)
|
||||
([?\s-`] . (lambda () (interactive) (exwm-workspace-switch-create 0)))
|
||||
,@(mapcar (lambda (i)
|
||||
`(,(kbd(format "s-%d" i)) .
|
||||
@@ -104,6 +90,27 @@
|
||||
(exwm-workspace-switch-create ,i))))
|
||||
(number-sequence 0 9))))
|
||||
|
||||
(setq exwm-input-simulation-keys
|
||||
`((,(kbd "C-f") . [right])
|
||||
(,(kbd "C-b") . [left])
|
||||
(,(kbd "C-p") . [up])
|
||||
(,(kbd "C-n") . [down])
|
||||
(,(kbd "C-a") . [home])
|
||||
(,(kbd "C-e") . [end])
|
||||
(,(kbd "M-f") . [C-right])
|
||||
(,(kbd "A-f") . [C-right])
|
||||
(,(kbd "M-b") . [C-left])
|
||||
(,(kbd "A-b") . [C-left])
|
||||
(,(kbd "C-d") . [delete])
|
||||
(,(kbd "C-k") . [S-end delete])
|
||||
(,(kbd "M-<backspace>") . ,(kbd "C-<backspace>"))
|
||||
(,(kbd "M-d") . ,(kbd "C-<delete>"))
|
||||
(,(kbd "M-w") . [?\C-c])
|
||||
(,(kbd "C-y") . [?\C-v])
|
||||
(,(kbd "C-w") . [?\C-x])
|
||||
(,(kbd "C-/") . [?\C-z])
|
||||
(,(kbd "C-?") . ,(kbd "C-S-z"))))
|
||||
|
||||
(defun my/exwm-update-class ()
|
||||
(exwm-workspace-rename-buffer exwm-class-name))
|
||||
|
||||
@@ -111,7 +118,6 @@
|
||||
|
||||
(require 'exwm-xim)
|
||||
(exwm-xim-mode)
|
||||
|
||||
(exwm-wm-mode))
|
||||
|
||||
(use-package desktop-environment
|
||||
@@ -133,10 +139,7 @@
|
||||
(add-hook 'exwm-init-hook
|
||||
(lambda ()
|
||||
(restart-fcitx5)
|
||||
(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")))
|
||||
(my-desktop-init)))
|
||||
|
||||
(use-package xdg-launcher
|
||||
:straight
|
||||
@@ -149,8 +152,7 @@
|
||||
(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))))))
|
||||
)
|
||||
(append consult-buffer-sources '(xdg-launcher-consult-source)))))))
|
||||
|
||||
(provide 'init-exwm)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user