;;; -*- lexical-binding: t; -*- ;;; Commentary: ;;; Code: ;;;; time and date (require 'time) (setq display-time-format " %m/%d %H:%M" display-time-default-load-average nil) (display-time) (defun bd/get-mode-line-modes (buffer) (with-current-buffer buffer (format-mode-line (remove '(t erc-modified-channels-object) mode-line-modes)))) ;;;; turn tabs on, undo/redo mode (setq tab-bar-show t) (tab-bar-history-mode) (tab-bar-select-tab 1) (tab-bar-mode) ;;;; remove useless gui elements (setopt tab-bar-format '(tab-bar-format-tabs tab-bar-format-align-right tab-bar-format-global) tab-bar-close-button-show nil ;; size tab-bar-auto-width-max nil) ;;;; add useless text elements (setopt tab-bar-tab-hints nil tab-bar-select-tab-modifiers '(meta)) (defun bd/tab-bar-name-function () (concat (tab-bar-tab-name-current) " " (bd/get-mode-line-modes (window-buffer (minibuffer-selected-window))))) (setopt project-switch-commands '((project-find-file "Find file") (project-find-regexp "Find regexp") (project-find-dir "Find directory") (magit-project-status "Magit") (project-shell "Shell"))) (keymap-global-set "C-x p v" 'magit-project-status) (setq tab-bar-tab-name-function #'bd/tab-bar-name-function) (provide 'bd--tabs) ;;; bd-tabs ends here