Created
March 18, 2021 17:53
-
-
Save krummja/91d996cfa3b9b1699915a7885cb268e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Theme Management | |
(use-package heaven-and-hell | |
:ensure t | |
:init | |
(setq heaven-and-hell-themes | |
'((light . doom-sakura-light) | |
(dark . doom-sakura-dark))) | |
(setq heaven-and-hell-load-theme-no-confirm t) | |
:hook (after-init . heaven-and-hell-init-hook)) | |
(defun sakura/toggle-tab-line-theme () | |
"Check the current theme type and load the corresponding tab-line theme." | |
(interactive) | |
(if (eq heaven-and-hell-theme-type 'dark) | |
(sakura/tab-line-dark-theme) | |
(sakura/tab-line-light-theme))) | |
(defun sakura/toggle-theme () | |
(interactive) | |
(call-interactively 'heaven-and-hell-toggle-theme) | |
(call-interactively 'sakura/toggle-tab-line-theme)) | |
;; Powerline | |
(use-package powerline) | |
(require 'powerline) | |
(defvar sakura/tab-height 22) | |
(defvar sakura/tab-left (powerline-wave-right 'tab-line nil sakura/tab-height)) | |
(defvar sakura/tab-right (powerline-wave-left nil 'tab-line sakura/tab-height)) | |
;; Tab-Line-Mode | |
(defun sakura/tab-line-tab-name-buffer (buffer &optional _buffers) | |
(powerline-render (list sakura/tab-left | |
(format " %s " (buffer-name buffer)) | |
sakura/tab-right))) | |
(setq tab-line-tab-name-function #'sakura/tab-line-tab-name-buffer) | |
(setq tab-line-new-button-show nil) | |
(setq tab-line-close-button-show nil) | |
(defun sakura/tab-line-dark-theme () | |
(global-tab-line-mode) | |
(setq sakura/tab-left (powerline-wave-right 'tab-line nil sakura/tab-height)) | |
(setq sakura/tab-right (powerline-wave-left nil 'tab-line sakura/tab-height)) | |
(sakura/dark-theme-tab-line) | |
(global-tab-line-mode)) | |
(defun sakura/tab-line-light-theme () | |
(global-tab-line-mode) | |
(setq sakura/tab-left (powerline-wave-right 'tab-line nil sakura/tab-height)) | |
(setq sakura/tab-right (powerline-wave-left nil 'tab-line sakura/tab-height)) | |
(sakura/light-theme-tab-line) | |
(global-tab-line-mode)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment