diff options
| author | bdunahu <bdunahu@operationnull.com> | 2026-01-04 13:13:39 -0700 |
|---|---|---|
| committer | bdunahu <bdunahu@operationnull.com> | 2026-01-04 13:13:39 -0700 |
| commit | c2b706ff2f3aa42d58a03febad1d1b8f8d5a1142 (patch) | |
| tree | d6786f531f02717472abdc992cc6c6ef81e660b3 /kolwynia/home/bdunahu/files/.config/emacs/modules/bd--tabs.el | |
| parent | c4ca05231236c7e9bdf5304275eadde954acf588 (diff) | |
remove unnecessary nested guix dir
Diffstat (limited to 'kolwynia/home/bdunahu/files/.config/emacs/modules/bd--tabs.el')
| -rw-r--r-- | kolwynia/home/bdunahu/files/.config/emacs/modules/bd--tabs.el | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/kolwynia/home/bdunahu/files/.config/emacs/modules/bd--tabs.el b/kolwynia/home/bdunahu/files/.config/emacs/modules/bd--tabs.el new file mode 100644 index 0000000..6d4f12f --- /dev/null +++ b/kolwynia/home/bdunahu/files/.config/emacs/modules/bd--tabs.el @@ -0,0 +1,43 @@ +;;; -*- lexical-binding: t; -*- +;;; Commentary: +;;; Code: + + +(use-package tab-bar + :demand t + :config + (defun bd/get-mode-line-modes (buffer) + (with-current-buffer buffer + (format-mode-line (remove '(t erc-modified-channels-object) mode-line-modes)))) + (defun bd/tab-bar-name-function () + (concat (tab-bar-tab-name-current) + " " + (bd/get-mode-line-modes (window-buffer (minibuffer-selected-window))))) + (defun bd/toggle-tab-bar () + (interactive) + (setopt tab-bar-show (not tab-bar-show)) + ;; required to wait for the frame to update + (sit-for 0) + ;; dumb outer-gaps bug + (exwm-outer-gaps-apply)) + + (tab-bar-select-tab 1) + (tab-bar-mode) + (tab-bar-history-mode) + (setopt tab-bar-tab-name-function #'bd/tab-bar-name-function + tab-bar-show t + + tab-bar-select-restore-windows nil + + ;; remove useless gui elements + tab-bar-format + '(tab-bar-format-tabs) + tab-bar-close-button-show nil + tab-bar-auto-width-max nil + + ;; add useless text elements + tab-bar-tab-hints nil)) + + +(provide 'bd--tabs) +;;; bd--tabs.el ends here |
