mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-23 19:47:58 +01:00
Do the same for `exwm-input-global-keys'
This commit is contained in:
parent
ec108a61dc
commit
97b1fb7c13
1 changed files with 19 additions and 15 deletions
|
@ -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)
|
||||
;; 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
|
||||
|
|
Loading…
Reference in a new issue