From 5d40c938921c6df2af77df6a453eff70d60cf685 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Sat, 24 Dec 2022 19:52:34 -0500 Subject: Various tweaks and fixes for using EXWM * .Xresources.d/xterm: Allow send events, needed for EXWM's simulation keys to work. * .emacs.d/init.el: Check additionally that we're in a graphical environment, though not in another window manager or desktop environment, before running EXWM. Also, use the EXWM-provided function for switching buffers that also works for EXWM windows, including windows in other workspaces or those that are floating. * .emacs.d/lisp/bandali-exwm.el: Tweak and add to global and simulation keys for more convenience. * .gnupg/gpg-agent.conf: It seems we need to explicitly set a pinentry-program, otherwise GPG will pick the tty or ncurses one even when we're not in a tty or terminal, which will not work and cause problems when using EXWM. --- .emacs.d/lisp/bandali-exwm.el | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to '.emacs.d/lisp') diff --git a/.emacs.d/lisp/bandali-exwm.el b/.emacs.d/lisp/bandali-exwm.el index bd28d5b..dca5d70 100644 --- a/.emacs.d/lisp/bandali-exwm.el +++ b/.emacs.d/lisp/bandali-exwm.el @@ -90,14 +90,14 @@ around if needed." exwm-workspace-number 10 exwm-input-global-keys `(([?\s-R] . exwm-reset) - ([?\s-b] . exwm-workspace-switch-to-buffer) - ([?\s-\\] . exwm-workspace-switch) + ;; ([?\s-b] . exwm-workspace-switch-to-buffer) + ([?\s-/] . exwm-workspace-switch) ([?\s-\s] . dmenu) - ;; ([?\s-\s] . (lambda () - ;; (interactive) - ;; (start-process-shell-command - ;; "rofi" nil "rofi -show run"))) - ([?\S-\s-\s] . (lambda (command) ; doesn't work in X windows + ([?\s-\\] . (lambda () + (interactive) + (start-process-shell-command + "passmenu" nil "passmenu --type"))) + ([?\S-\s-\s] . (lambda (command) (interactive (list (read-shell-command "➜ "))) (start-process-shell-command @@ -110,10 +110,6 @@ around if needed." (start-process "" nil "xterm" "-name" "floating"))) ([?\C-\s-\s] . counsel-linux-app) - ([?\M-\s-\s] . (lambda () - (interactive) - (start-process-shell-command - "passmenu" nil "passmenu --type"))) ([?\s-h] . windmove-left) ([?\s-j] . windmove-down) ([?\s-k] . windmove-up) @@ -171,7 +167,7 @@ around if needed." (interactive) (exwm-workspace-move-window ,i)))) (number-sequence 0 (1- exwm-workspace-number))) - ([?\s-F] . exwm-floating-toggle-floating) + ([?\s-.] . exwm-floating-toggle-floating) ([?\s-f] . exwm-layout-toggle-fullscreen) ([?\s-W] . (lambda () (interactive) @@ -183,6 +179,10 @@ around if needed." (interactive) (start-process-shell-command "dmneu-light" nil "dmenu-light"))) + ([?\s-\;] . (lambda () + (interactive) + (start-process-shell-command + "dmneu-pamixer" nil "dmenu-pamixer"))) ([XF86AudioMute] . ; borken on my X200 :-( (lambda () (interactive) @@ -262,8 +262,10 @@ around if needed." ([?\s-q] . [?\C-q]) ;; misc ([?\C-s] . [?\C-f]) + ([?\s-g] . [?\C-g]) ([?\s-s] . [?\C-s]) - ([?\C-g] . [escape]))) + ([?\C-g] . [escape]) + ([?\C-/] . [?\C-z]))) (require 'exwm-manage) (setq -- cgit v1.2.3-60-g2f50