[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm 97b1fb7 4/7: Do the same for `exwm-input-global-ke
From: |
Chris Feng |
Subject: |
[elpa] externals/exwm 97b1fb7 4/7: Do the same for `exwm-input-global-keys' |
Date: |
Wed, 6 Feb 2019 06:35:33 -0500 (EST) |
branch: externals/exwm
commit 97b1fb7c13ad7505ffe144f15875b366f1619f29
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>
Do the same for `exwm-input-global-keys'
---
exwm-config.el | 34 +++++++++++++++++++---------------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/exwm-config.el b/exwm-config.el
index 8223633..6635e43 100644
--- a/exwm-config.el
+++ b/exwm-config.el
@@ -37,21 +37,25 @@
(add-hook 'exwm-update-class-hook
(lambda ()
(exwm-workspace-rename-buffer exwm-class-name)))
- ;; 's-r': Reset
- (exwm-input-set-key (kbd "s-r") #'exwm-reset)
- ;; 's-w': Switch workspace
- (exwm-input-set-key (kbd "s-w") #'exwm-workspace-switch)
- ;; 's-N': Switch to certain workspace
- (dotimes (i 10)
- (exwm-input-set-key (kbd (format "s-%d" i))
- `(lambda ()
- (interactive)
- (exwm-workspace-switch-create ,i))))
- ;; 's-&': Launch application
- (exwm-input-set-key (kbd "s-&")
- (lambda (command)
- (interactive (list (read-shell-command "$ ")))
- (start-process-shell-command command nil command)))
+ ;; Global keybindings.
+ (unless (get 'exwm-input-global-keys 'saved-value)
+ (setq exwm-input-global-keys
+ `(
+ ;; 's-r': Reset (to line-mode).
+ ([?\s-r] . exwm-reset)
+ ;; 's-w': Switch workspace.
+ ([?\s-w] . exwm-workspace-switch)
+ ;; 's-&': Launch application.
+ ([?\s-&] . (lambda (command)
+ (interactive (list (read-shell-command "$ ")))
+ (start-process-shell-command command nil command)))
+ ;; 's-N': Switch to certain workspace.
+ ,@(mapcar (lambda (i)
+ `(,(kbd (format "s-%d" i)) .
+ (lambda ()
+ (interactive)
+ (exwm-workspace-switch-create ,i))))
+ (number-sequence 0 9)))))
;; Line-editing shortcuts
(unless (get 'exwm-input-simulation-keys 'saved-value)
(setq exwm-input-simulation-keys
- [elpa] externals/exwm updated (4462981 -> 225c68d), Chris Feng, 2019/02/06
- [elpa] externals/exwm 97b1fb7 4/7: Do the same for `exwm-input-global-keys',
Chris Feng <=
- [elpa] externals/exwm ec108a6 3/7: Cleanup simulation key config issues, Chris Feng, 2019/02/06
- [elpa] externals/exwm cd7b32d 2/7: Hide minibuffer upon receiving any event, Chris Feng, 2019/02/06
- [elpa] externals/exwm 225c68d 7/7: Merge branch 'retain-echo-area-until-input' of https://github.com/medranocalvo/exwm into medranocalvo/retain-echo-area-until-input, Chris Feng, 2019/02/06
- [elpa] externals/exwm e157282 6/7: Merge branch 'ieure/default-simulation-keys' into externals/exwm, Chris Feng, 2019/02/06
- [elpa] externals/exwm 0dd909a 1/7: Stop hiding the minibuffer when a message is being displayed, Chris Feng, 2019/02/06
- [elpa] externals/exwm 0f7269c 5/7: Add input method support, Chris Feng, 2019/02/06