summaryrefslogtreecommitdiff
path: root/.config/emacs/modules/bd--tabs.el
blob: 3bdf282d84eef2457885ad117042222d42db9379 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
;;; -*- lexical-binding: t; -*-
;;; Commentary:
;;; Code:


(use-package time
  :init
  (display-time)
  :custom
  (display-time-format "  %m/%d %H:%M")
  (display-time-default-load-average nil))

(use-package tab-bar
  :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)))))

  (tab-bar-select-tab 1)
  (tab-bar-mode)
  (tab-bar-history-mode)
  :custom
  (tab-bar-tab-name-function #'bd/tab-bar-name-function)
  (tab-bar-show t)

  ;; remove useless gui elements
  (tab-bar-format
   '(tab-bar-format-tabs
     tab-bar-format-align-right
     tab-bar-format-global))
  (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 ends here