feat(tazjin/emacs): initial tab-bar-mode configuration
Sets up tab-bar-mode for EXWM, and adds simple initial configuration and shortcuts to make it behave sanely. I had to assign tab switching shortcuts myself, as the EXWM input key stuff doesn't work correctly with the built-in way of setting these shortcuts in tab-bar-mode. Change-Id: Icd96f03ae7bd2bd5f7c2d59f9aca7a1ca2e7f788 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10116 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
683c8bade3
commit
e8fb39c36d
2 changed files with 23 additions and 3 deletions
|
@ -108,6 +108,15 @@
|
||||||
(add-hook 'exwm-update-title-hook titlef))
|
(add-hook 'exwm-update-title-hook titlef))
|
||||||
|
|
||||||
(fringe-mode 3)
|
(fringe-mode 3)
|
||||||
|
|
||||||
|
;; tab-bar related config
|
||||||
|
(setq tab-bar-show 1)
|
||||||
|
(setq tab-bar-tab-hints t)
|
||||||
|
(setq tab-bar-new-tab-choice
|
||||||
|
(lambda () (get-buffer-create "*scratch*")))
|
||||||
|
|
||||||
|
(tab-bar-mode 1)
|
||||||
|
|
||||||
(exwm-enable)
|
(exwm-enable)
|
||||||
(exwm-randr-enable)
|
(exwm-randr-enable)
|
||||||
|
|
||||||
|
@ -193,13 +202,24 @@ ring."
|
||||||
|
|
||||||
(exwm-input-set-key (kbd "C-c j") #'exwm-jump-to-buffer)
|
(exwm-input-set-key (kbd "C-c j") #'exwm-jump-to-buffer)
|
||||||
|
|
||||||
|
;; Tab-management shortcuts
|
||||||
|
|
||||||
|
(dotimes (i 8)
|
||||||
|
(exwm-input-set-key (kbd (format "s-%d" (+ 1 i))) #'tab-bar-select-tab))
|
||||||
|
|
||||||
|
(exwm-input-set-key (kbd "s-9") #'tab-last)
|
||||||
|
(exwm-input-set-key (kbd "s-f") #'tab-next)
|
||||||
|
(exwm-input-set-key (kbd "s-b") #'tab-recent)
|
||||||
|
(exwm-input-set-key (kbd "s-w") #'tab-close)
|
||||||
|
(exwm-input-set-key (kbd "s-n") #'tab-new)
|
||||||
|
|
||||||
;; Launch applications / any command with completion (dmenu style!)
|
;; Launch applications / any command with completion (dmenu style!)
|
||||||
(exwm-input-set-key (kbd "s-d") #'run-xdg-app)
|
(exwm-input-set-key (kbd "s-d") #'run-xdg-app)
|
||||||
(exwm-input-set-key (kbd "s-x") #'run-external-command)
|
(exwm-input-set-key (kbd "s-x") #'run-external-command)
|
||||||
(exwm-input-set-key (kbd "s-p") #'password-store-lookup)
|
(exwm-input-set-key (kbd "s-p") #'password-store-lookup)
|
||||||
|
|
||||||
;; Add X11 terminal selector to a key
|
;; Add vterm selector to a key
|
||||||
(exwm-input-set-key (kbd "C-x t") #'ts/switch-to-terminal)
|
(exwm-input-set-key (kbd "s-v") #'ts/switch-to-terminal)
|
||||||
|
|
||||||
;; Toggle between line-mode / char-mode
|
;; Toggle between line-mode / char-mode
|
||||||
(exwm-input-set-key (kbd "C-c C-t C-t") #'exwm-input-toggle-keyboard)
|
(exwm-input-set-key (kbd "C-c C-t C-t") #'exwm-input-toggle-keyboard)
|
||||||
|
|
|
@ -178,7 +178,7 @@
|
||||||
(setq common-lisp-hyperspec-root "file:///home/tazjin/docs/lisp/"))
|
(setq common-lisp-hyperspec-root "file:///home/tazjin/docs/lisp/"))
|
||||||
|
|
||||||
(use-package telega
|
(use-package telega
|
||||||
:bind (:map global-map ("s-t" . (lambda (p) (interactive "P")
|
:bind (:map global-map ("s-c" . (lambda (p) (interactive "P")
|
||||||
(if p (call-interactively #'telega-chat-with)
|
(if p (call-interactively #'telega-chat-with)
|
||||||
(telega))))
|
(telega))))
|
||||||
:map telega-chat-button-map ("a" . ignore))
|
:map telega-chat-button-map ("a" . ignore))
|
||||||
|
|
Loading…
Reference in a new issue