From c2b706ff2f3aa42d58a03febad1d1b8f8d5a1142 Mon Sep 17 00:00:00 2001 From: bdunahu Date: Sun, 4 Jan 2026 13:13:39 -0700 Subject: remove unnecessary nested guix dir --- .../files/.config/emacs/modules/bd--tabs.el | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 kolwynia/home/bdunahu/files/.config/emacs/modules/bd--tabs.el (limited to 'kolwynia/home/bdunahu/files/.config/emacs/modules/bd--tabs.el') 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 -- cgit v1.2.3