[exwm] Remove manual XF86 keybindings (#14770)

This commit is contained in:
Benjamin Yang 2021-05-15 16:24:01 -04:00 committed by GitHub
parent 80e2fd4279
commit fef9ba9e18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 21 deletions

View File

@ -85,7 +85,6 @@ you want you can enable it, this layer focuses on less Emacs-y bindings.
| Key binding | Description |
|-----------------------+------------------------------------------------|
| ~C-q~ | Send next key pressed to the X window |
| ~C-'~ | Pop shell |
| ~C-g~ | Universal GetMeOuttaHere Key from Emacs |
| ~C-u~ | Universal Argument |
| ~C-[0-9]~ | Universal Prefix for [0-9] |
@ -96,7 +95,8 @@ you want you can enable it, this layer focuses on less Emacs-y bindings.
| ~s-r~ | Reset window state |
| ~s-SPC~ | App Launcher |
| ~s-ESC~ | Lock Screen |
| ~s-:~ and ~s-;~ | Helm M-x (same as ~SCP :~) |
| ~s-RET~ | Pop shell |
| ~s-:~ and ~s-;~ | Helm M-x (same as ~SPC :~) |
| ~s-u,U~ | Undo, Redo window configurations |
| ~s-b~ | Show all opened buffers |
| ~s-h,j,k,l~ | Switch to left,lower,upper,right window |

View File

@ -53,16 +53,15 @@
:evil-leader "TD")
:config
(progn
;; We bypass desktop-environment's locking functionality for 2 reasons:
;; 1. s-l is most likely needed for window manipulation
;; 2. desktop-environment's locking mechanism does not support registering as session manager
;; The following line would instead assign their locking command to the default binding:
;; (define-key desktop-environment-mode-map (kbd "<s-pause>") (lookup-key desktop-environment-mode-map (kbd "s-l")))
(setq desktop-environment-update-exwm-global-keys :prefix)
(define-key desktop-environment-mode-map (kbd "s-l") nil)
;; If we don't enable this, exwm/switch-to-buffer-or-run won't move an X window to the current frame
(setq exwm-layout-show-all-buffers t))))
;; We bypass desktop-environment's locking functionality for 2 reasons:
;; 1. s-l is most likely needed for window manipulation
;; 2. desktop-environment's locking mechanism does not support registering as session manager
;; The following line would instead assign their locking command to the default binding:
;; (define-key desktop-environment-mode-map (kbd "<s-pause>") (lookup-key desktop-environment-mode-map (kbd "s-l")))
(setq desktop-environment-update-exwm-global-keys :prefix)
(define-key desktop-environment-mode-map (kbd "s-l") nil)
;; If we don't enable this, exwm/switch-to-buffer-or-run won't move an X window to the current frame
(setq exwm-layout-show-all-buffers t))
(defun exwm/init-helm-exwm ()
;; when helm is used activate extra EXWM features
@ -157,15 +156,7 @@
(easy-menu-add-item exwm-mode-menu '()
["Move X window to" exwm-workspace-move-window])
(exwm/exwm-bind-command
"s-'" exwm-terminal-command
"<s-return>" exwm-terminal-command
"<XF86MonBrightnessUp>" "light -A 5"
"<XF86MonBrightnessDown>" "light -U 5"
"<XF86AudioLowerVolume>" "amixer -D pulse -- sset Master unmute 3%-"
"<XF86AudioRaiseVolume>" "amixer -D pulse -- sset Master unmute 3%+"
"<XF86AudioMute>" "amixer -D pulse -- sset Master toggle"
"<XF86AudioMicMute>" "amixer -D pulse -- sset Capture toggle")
(exwm/exwm-bind-command "<s-return>" exwm-terminal-command)
;; Pass all keypresses to emacs in line mode.
(setq exwm-input-line-mode-passthrough t)