diff options
| author | bard <[email protected]> | 2024-05-23 10:05:56 -0400 |
|---|---|---|
| committer | bard <[email protected]> | 2024-05-23 10:05:56 -0400 |
| commit | f31b28cd05b956288348beffec05ef9aa2578ac8 (patch) | |
| tree | 38ca80c92645fd5da2bbc170e5362ecb2006b9e9 | |
| parent | 06aa3733dd7168a4b14b43692a2594526af445f4 (diff) | |
no tab bars
| -rw-r--r-- | bard-emacs-modules/bard-emacs-theme.el | 112 | ||||
| -rw-r--r-- | bard-emacs-modules/bard-emacs-ui.el | 116 |
2 files changed, 114 insertions, 114 deletions
diff --git a/bard-emacs-modules/bard-emacs-theme.el b/bard-emacs-modules/bard-emacs-theme.el index a4a82f0..bd792f2 100644 --- a/bard-emacs-modules/bard-emacs-theme.el +++ b/bard-emacs-modules/bard-emacs-theme.el @@ -78,7 +78,7 @@ The exact color values are taken from the active Ef theme." '((prose-verbatim yellow-cooler))) (add-hook 'ef-themes-post-load-hook #'bard/ef-themes-hl-todo-faces) - (add-hook 'ef-themes-post-load-hook #'bard/tab-bar-vim-like-colors) + ;; (add-hook 'ef-themes-post-load-hook #'bard/tab-bar-vim-like-colors) (define-key global-map (kbd "M-<f5>") #'ef-themes-select) (setq ef-themes-to-toggle '(ef-winter ef-frost)) (setq ef-themes-mixed-fonts t) @@ -128,7 +128,7 @@ The exact color values are taken from the active Ef theme." (?C . (:inherit (shadow org-priority))))) (add-hook 'modus-themes-post-load-hook #'bard/modus-themes-hl-todo-faces) - (add-hook 'modus-themes-post-load-hook #'bard/tab-bar-vim-like-colors) + ;; (add-hook 'modus-themes-post-load-hook #'bard/tab-bar-vim-like-colors) (setq modus-themes-to-toggle '(modus-vivendi modus-operandi-tinted)) (setq modus-themes-mixed-fonts t) @@ -137,60 +137,60 @@ The exact color values are taken from the active Ef theme." ;;;; Fonts (use-package fontaine - :ensure t) - -(setq fontaine-presets - '((small - :default-height 130 - :default-family "Iosevka Comfy" - :variable-pitch-family "Iosevka Comfy Motion" - :variable-pitch-height 1.0 - :fixed-pitch-family "Iosevka Comfy" - :fixed-pitch-height 1.0 - :bold-weight bold - :mode-line-active-family "Iosevka Comfy" - :mode-line-active-height 130 - :mode-line-inactive-height 130 - ) - (medium - :inherit small - :default-height 140 - :mode-line-active-height 140 - :mode-line-inactive-height 140) - (large - :inherit small - :variable-pitch-family "Iosevka Comfy Wide Motion" - :default-height 170 - :mode-line-active-height 140 - :mode-line-inactive-height 140 - ) - (presentation - :inherit small - :default-height 170 - :default-family "Iosevka Comfy Wide" - :variable-pitch-family "Iosevka Comfy Wide Motion" - :default-height 170 - :mode-line-active-height 150 - :mode-line-inactive-height 150) - (t - :default-family "Monospace" - ))) - -;; save file -(setq fontaine-latest-state-file - (locate-user-emacs-file "fontaine-latest-state.eld")) - -;; Set last preset or fall back to desired style from `fontaine-presets'. -(fontaine-set-preset (or (fontaine-restore-latest-preset) 'small)) - -;; The other side of `fontaine-restore-latest-preset'. -(add-hook 'kill-emacs-hook #'fontaine-store-latest-preset) - -;; preserve fonts when switching themes -(dolist (hook '(modus-themes-after-load-theme-hook ef-themes-post-load-hook)) - (add-hook hook #'fontaine-apply-current-preset)) - -(define-key global-map (kbd "C-c f") #'fontaine-set-preset) + :ensure t + :config + (setq fontaine-presets + '((small + :default-height 130 + :default-family "Iosevka Comfy" + :variable-pitch-family "Iosevka Comfy Motion" + :variable-pitch-height 1.0 + :fixed-pitch-family "Iosevka Comfy" + :fixed-pitch-height 1.0 + :bold-weight bold + :mode-line-active-family "Iosevka Comfy" + :mode-line-active-height 130 + :mode-line-inactive-height 130 + ) + (medium + :inherit small + :default-height 140 + :mode-line-active-height 140 + :mode-line-inactive-height 140) + (large + :inherit small + :variable-pitch-family "Iosevka Comfy Wide Motion" + :default-height 170 + :mode-line-active-height 140 + :mode-line-inactive-height 140 + ) + (presentation + :inherit small + :default-height 170 + :default-family "Iosevka Comfy Wide" + :variable-pitch-family "Iosevka Comfy Wide Motion" + :default-height 170 + :mode-line-active-height 150 + :mode-line-inactive-height 150) + (t + :default-family "Monospace" + ))) + + ;; save file + (setq fontaine-latest-state-file + (locate-user-emacs-file "fontaine-latest-state.eld")) + + ;; Set last preset or fall back to desired style from `fontaine-presets'. + (fontaine-set-preset (or (fontaine-restore-latest-preset) 'small)) + + ;; The other side of `fontaine-restore-latest-preset'. + (add-hook 'kill-emacs-hook #'fontaine-store-latest-preset) + + ;; preserve fonts when switching themes + (dolist (hook '(modus-themes-after-load-theme-hook ef-themes-post-load-hook)) + (add-hook hook #'fontaine-apply-current-preset)) + + (define-key global-map (kbd "C-c f") #'fontaine-set-preset)) ;; Switching themes (defun bard/disable-all-themes () diff --git a/bard-emacs-modules/bard-emacs-ui.el b/bard-emacs-modules/bard-emacs-ui.el index 61e05e9..228ee8e 100644 --- a/bard-emacs-modules/bard-emacs-ui.el +++ b/bard-emacs-modules/bard-emacs-ui.el @@ -72,64 +72,64 @@ (which-key-mode 1)) ;;; Tab bars -;; taken from https://www.jamescherti.com/emacs-tab-bar-vim-style-colors/ -(defun bard/tab-bar-vim-name-format-function (tab i) - "Add a space on the sides of every tab." - (let ((current-p (eq (car tab) 'current-tab))) - (propertize - (concat " " - (if tab-bar-tab-hints (format "%d " i) "") - (alist-get 'name tab) - (or (and tab-bar-close-button-show - (not (eq tab-bar-close-button-show - (if current-p 'non-selected 'selected))) - tab-bar-close-button) - "") - " ") - 'face (funcall tab-bar-tab-face-function tab)))) - -(defun bard/tab-bar-vim-like-colors () - "Apply Vim-like color themes to Emacs tab bars." - (let* ((fallback-light "white") - (fallback-dark "#333333") - (bg-default (or (face-attribute 'default :background) fallback-light)) - (fg-default (or (face-attribute 'default :foreground) fallback-dark)) - (bg-modeline-inactive (or (face-attribute 'mode-line-inactive :background) - fallback-dark)) - (fg-modeline-inactive (or (face-attribute 'mode-line-inactive :foreground) - fallback-light)) - (bg-tab-inactive bg-modeline-inactive) - (fg-tab-inactive fg-modeline-inactive) - (fg-tab-active fg-default) - (bg-tab-active bg-default)) - (setq tab-bar-tab-name-format-function #'bard/tab-bar-vim-name-format-function) - (setq tab-bar-format '(tab-bar-format-tabs tab-bar-separator)) - (setq tab-bar-separator "\u200B") ;; Zero width space to fix color bleeding - (setq tab-bar-tab-hints nil) ;; Tab numbers of the left of the label - (setq tab-bar-new-button-show nil) - (setq tab-bar-close-button-show nil) - (setq tab-bar-auto-width nil) - (custom-set-faces - ;; The tab bar's appearance - `(tab-bar - ((t (:background ,bg-tab-inactive - :foreground ,fg-tab-inactive - :box (:line-width 3 :color ,bg-tab-inactive :style nil))))) - ;; Inactive tabs - `(tab-bar-tab-inactive - ((t (:background ,bg-tab-inactive - :foreground ,fg-tab-inactive - :box (:line-width 3 :color ,bg-tab-inactive :style nil))))) - ;; Active tab - `(tab-bar-tab - ((t (:background ,bg-tab-active :foreground ,fg-tab-active - :box (:line-width 3 :color ,bg-tab-active :style nil)))))))) - -;; Customize the appearance of the tab bar -;; Make sure to load your theme using 'load-theme' before -;; calling 'bard/tab-bar-vim-like-colors'. -(tab-bar-mode 1) -(bard/tab-bar-vim-like-colors) +;; ;; taken from https://www.jamescherti.com/emacs-tab-bar-vim-style-colors/ +;; (defun bard/tab-bar-vim-name-format-function (tab i) +;; "Add a space on the sides of every tab." +;; (let ((current-p (eq (car tab) 'current-tab))) +;; (propertize +;; (concat " " +;; (if tab-bar-tab-hints (format "%d " i) "") +;; (alist-get 'name tab) +;; (or (and tab-bar-close-button-show +;; (not (eq tab-bar-close-button-show +;; (if current-p 'non-selected 'selected))) +;; tab-bar-close-button) +;; "") +;; " ") +;; 'face (funcall tab-bar-tab-face-function tab)))) + +;; (defun bard/tab-bar-vim-like-colors () +;; "Apply Vim-like color themes to Emacs tab bars." +;; (let* ((fallback-light "white") +;; (fallback-dark "#333333") +;; (bg-default (or (face-attribute 'default :background) fallback-light)) +;; (fg-default (or (face-attribute 'default :foreground) fallback-dark)) +;; (bg-modeline-inactive (or (face-attribute 'mode-line-inactive :background) +;; fallback-dark)) +;; (fg-modeline-inactive (or (face-attribute 'mode-line-inactive :foreground) +;; fallback-light)) +;; (bg-tab-inactive bg-modeline-inactive) +;; (fg-tab-inactive fg-modeline-inactive) +;; (fg-tab-active fg-default) +;; (bg-tab-active bg-default)) +;; (setq tab-bar-tab-name-format-function #'bard/tab-bar-vim-name-format-function) +;; (setq tab-bar-format '(tab-bar-format-tabs tab-bar-separator)) +;; (setq tab-bar-separator "\u200B") ;; Zero width space to fix color bleeding +;; (setq tab-bar-tab-hints nil) ;; Tab numbers of the left of the label +;; (setq tab-bar-new-button-show nil) +;; (setq tab-bar-close-button-show nil) +;; (setq tab-bar-auto-width nil) +;; (custom-set-faces +;; ;; The tab bar's appearance +;; `(tab-bar +;; ((t (:background ,bg-tab-inactive +;; :foreground ,fg-tab-inactive +;; :box (:line-width 3 :color ,bg-tab-inactive :style nil))))) +;; ;; Inactive tabs +;; `(tab-bar-tab-inactive +;; ((t (:background ,bg-tab-inactive +;; :foreground ,fg-tab-inactive +;; :box (:line-width 3 :color ,bg-tab-inactive :style nil))))) +;; ;; Active tab +;; `(tab-bar-tab +;; ((t (:background ,bg-tab-active :foreground ,fg-tab-active +;; :box (:line-width 3 :color ,bg-tab-active :style nil)))))))) + +;; ;; Customize the appearance of the tab bar +;; ;; Make sure to load your theme using 'load-theme' before +;; ;; calling 'bard/tab-bar-vim-like-colors'. +;; (tab-bar-mode 1) +;; (bard/tab-bar-vim-like-colors) (provide 'bard-emacs-ui) |
