diff options
author | Vincent Ambo <mail@tazj.in> | 2023-11-24T23·29+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2023-11-25T15·45+0000 |
commit | e8fb39c36d60a9879db053303b44138f16e3319f (patch) | |
tree | 3f4359895d024206f4b5422e5fb1a12b814ca2dc /users/tazjin/emacs/config | |
parent | 683c8bade3be20c7451fbbdce9f5a6cae8a40cfd (diff) |
feat(tazjin/emacs): initial tab-bar-mode configuration r/7061
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>
Diffstat (limited to 'users/tazjin/emacs/config')
-rw-r--r-- | users/tazjin/emacs/config/desktop.el | 24 | ||||
-rw-r--r-- | users/tazjin/emacs/config/init.el | 2 |
2 files changed, 23 insertions, 3 deletions
diff --git a/users/tazjin/emacs/config/desktop.el b/users/tazjin/emacs/config/desktop.el index 28f0b5908877..368e773c7567 100644 --- a/users/tazjin/emacs/config/desktop.el +++ b/users/tazjin/emacs/config/desktop.el @@ -108,6 +108,15 @@ (add-hook 'exwm-update-title-hook titlef)) (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-randr-enable) @@ -193,13 +202,24 @@ ring." (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!) (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-p") #'password-store-lookup) -;; Add X11 terminal selector to a key -(exwm-input-set-key (kbd "C-x t") #'ts/switch-to-terminal) +;; Add vterm selector to a key +(exwm-input-set-key (kbd "s-v") #'ts/switch-to-terminal) ;; Toggle between line-mode / char-mode (exwm-input-set-key (kbd "C-c C-t C-t") #'exwm-input-toggle-keyboard) diff --git a/users/tazjin/emacs/config/init.el b/users/tazjin/emacs/config/init.el index f3a6c555815d..3f9acd846309 100644 --- a/users/tazjin/emacs/config/init.el +++ b/users/tazjin/emacs/config/init.el @@ -178,7 +178,7 @@ (setq common-lisp-hyperspec-root "file:///home/tazjin/docs/lisp/")) (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) (telega)))) :map telega-chat-button-map ("a" . ignore)) |