mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-02-16 08:14:15 +00:00
Distinguish between "global" keybindings and "line-mode" keybindings
This commit is contained in:
parent
a386939a68
commit
1bc84cede3
1 changed files with 14 additions and 9 deletions
|
|
@ -24,19 +24,24 @@
|
||||||
:config
|
:config
|
||||||
(with-eval-after-load "exwm"
|
(with-eval-after-load "exwm"
|
||||||
(add-to-list 'exwm-input-global-keys
|
(add-to-list 'exwm-input-global-keys
|
||||||
(cons ,keybinding ,function))))
|
(cons ,keybinding ,function))))))
|
||||||
|
|
||||||
|
(defmacro exwm-line-mode-set-key (keybinding function)
|
||||||
|
`(progn
|
||||||
|
(with-eval-after-load "exwm"
|
||||||
|
(define-key exwm-mode-map ,keybinding ,function))
|
||||||
(define-key pestctrl-minor-mode-map ,keybinding ,function)))
|
(define-key pestctrl-minor-mode-map ,keybinding ,function)))
|
||||||
|
|
||||||
(pestctrl-minor-mode 1)
|
(pestctrl-minor-mode 1)
|
||||||
|
|
||||||
(exwm-global-set-key (kbd "M-T") 'flop-frame)
|
(exwm-global-set-key (kbd "s-k") #'kill-current-buffer)
|
||||||
(exwm-global-set-key (kbd "s-k") (lambda () (interactive) (kill-buffer (current-buffer))))
|
|
||||||
(exwm-global-set-key (kbd "M-Q") #'bury-buffer)
|
|
||||||
(exwm-global-set-key (kbd "M-P") #'previous-buffer)
|
|
||||||
(exwm-global-set-key (kbd "M-N") #'next-buffer)
|
|
||||||
(exwm-global-set-key (kbd "s-o") #'other-window)
|
|
||||||
(exwm-global-set-key (kbd "s-u") #'org-capture)
|
(exwm-global-set-key (kbd "s-u") #'org-capture)
|
||||||
(global-set-key (kbd "M-o") #'other-window)
|
|
||||||
|
(exwm-line-mode-set-key (kbd "M-T") 'flop-frame)
|
||||||
|
(exwm-line-mode-set-key (kbd "M-Q") #'bury-buffer)
|
||||||
|
(exwm-line-mode-set-key (kbd "M-P") #'previous-buffer)
|
||||||
|
(exwm-line-mode-set-key (kbd "M-N") #'next-buffer)
|
||||||
|
(exwm-line-mode-set-key (kbd "M-o") #'other-window)
|
||||||
;; (add-to-list 'exwm-input-global-keys
|
;; (add-to-list 'exwm-input-global-keys
|
||||||
;; (cons (kbd "C-g") #'keyboard-quit))
|
;; (cons (kbd "C-g") #'keyboard-quit))
|
||||||
|
|
||||||
|
|
@ -55,7 +60,7 @@
|
||||||
|
|
||||||
(define-prefix-command '*root-map*)
|
(define-prefix-command '*root-map*)
|
||||||
(define-key *root-map* (kbd my/keymap-key) (key-binding (kbd "C-t")))
|
(define-key *root-map* (kbd my/keymap-key) (key-binding (kbd "C-t")))
|
||||||
(exwm-global-set-key (kbd my/keymap-key) '*root-map*)
|
(exwm-line-mode-set-key (kbd my/keymap-key) '*root-map*)
|
||||||
|
|
||||||
(define-key *root-map* (kbd "C-n") 'switch-window)
|
(define-key *root-map* (kbd "C-n") 'switch-window)
|
||||||
(define-key *root-map* (kbd "i") 'org-mru-clock-in)
|
(define-key *root-map* (kbd "i") 'org-mru-clock-in)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue