From d43f5f350ab6d47939cf79c6eb1a566343115db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Mon, 17 Oct 2022 05:26:11 +0800 Subject: Set vscode like default theme --- modules/init-doom-theme.el | 86 ++++++++++++++++++++++++++++++++++++++++++++ modules/init-theme.el | 86 -------------------------------------------- modules/init-vscode-theme.el | 46 ++++++++++++++++++++++++ 3 files changed, 132 insertions(+), 86 deletions(-) create mode 100644 modules/init-doom-theme.el delete mode 100644 modules/init-theme.el create mode 100644 modules/init-vscode-theme.el (limited to 'modules') diff --git a/modules/init-doom-theme.el b/modules/init-doom-theme.el new file mode 100644 index 0000000..7eb4af3 --- /dev/null +++ b/modules/init-doom-theme.el @@ -0,0 +1,86 @@ +;;; init-doom-theme.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: +(use-package doom-themes + :pin "MELPA" + :ensure t + :bind + ("C-x t d" . dark-theme) + ("C-x t s" . semi-dark-theme) + ("C-x t l" . light-theme) + + :init + (defun light-theme () + "Activate light colortheme" + (interactive) + (load-theme 'doom-one-light) + (delete-selection-mode 1) + ) + + (defun dark-theme () + "Activate dark colortheme" + (interactive) + (load-theme 'doom-molokai) + (delete-selection-mode 1) + ;; Invoke customcolors + (darkcolor) + ) + + (defun semi-dark-theme () + "Activate semi-dark colortheme" + (interactive) + (load-theme 'doom-molokai) + (delete-selection-mode 1) + ;; Invoke customcolors + (semidarkcolor) + ) + + ;; Invoke theme + (load-theme 'doom-molokai t) ;; global + + :config + (defun darkcolor () + "Simple dark for theme." + (set-cursor-color "#2979FF") + (set-face-background 'highlight "#2979FF") + (set-background-color "#101418") + + ;; Modeline + (set-face-background 'mode-line "#0C0E10") + (set-face-background 'modeline-inactive "#333333") + ;; (set-face-foreground 'mode-line "#FFFFFF") + + ;; Fix linum current-line highlight + (defface my-linum-hl + '((t :background "#0C0E10" :foreground "gold")) + "Face for the currently active Line number" + :group 'linum) + ) + + (defun semidarkcolor () + "Simple semidarkcolor for theme." + (set-cursor-color "#2979FF") + (set-face-background 'highlight "#2979FF") + (set-background-color "#1C1E1F") + + ;; Modeline + (set-face-background 'mode-line "#2D2E2E") + (set-face-background 'mode-line-inactive "#333333") + ;; (set-face-foreground 'mode-line "#FFFFFF") + + ;; Fix linum current-line highlight + (defface my-linum-hl + '((t :background "gray20" :foreground "gold")) + "Face for the currently active Line number" + :group 'linum) + ) + + ;; Invoke color + (semidarkcolor) ;; default + ) + +(provide 'init-doom-theme) + +;;; init-doom-theme.el ends here diff --git a/modules/init-theme.el b/modules/init-theme.el deleted file mode 100644 index 939b30f..0000000 --- a/modules/init-theme.el +++ /dev/null @@ -1,86 +0,0 @@ -;;; init-theme.el --- .Emacs Configuration -*- lexical-binding: t -*- -;;; Commentary: -;; - -;;; Code: -(use-package doom-themes - :pin "MELPA" - :ensure t - :bind - ("C-x t d" . dark-theme) - ("C-x t s" . semi-dark-theme) - ("C-x t l" . light-theme) - - :init - (defun light-theme () - "Activate light colortheme" - (interactive) - (load-theme 'doom-one-light) - (delete-selection-mode 1) - ) - - (defun dark-theme () - "Activate dark colortheme" - (interactive) - (load-theme 'doom-molokai) - (delete-selection-mode 1) - ;; Invoke customcolors - (darkcolor) - ) - - (defun semi-dark-theme () - "Activate semi-dark colortheme" - (interactive) - (load-theme 'doom-molokai) - (delete-selection-mode 1) - ;; Invoke customcolors - (semidarkcolor) - ) - - ;; Invoke theme - (load-theme 'doom-molokai t) ;; global - - :config - (defun darkcolor () - "Simple dark for theme." - (set-cursor-color "#2979FF") - (set-face-background 'highlight "#2979FF") - (set-background-color "#101418") - - ;; Modeline - (set-face-background 'mode-line "#0C0E10") - (set-face-background 'modeline-inactive "#333333") - ;; (set-face-foreground 'mode-line "#FFFFFF") - - ;; Fix linum current-line highlight - (defface my-linum-hl - '((t :background "#0C0E10" :foreground "gold")) - "Face for the currently active Line number" - :group 'linum) - ) - - (defun semidarkcolor () - "Simple semidarkcolor for theme." - (set-cursor-color "#2979FF") - (set-face-background 'highlight "#2979FF") - (set-background-color "#1C1E1F") - - ;; Modeline - (set-face-background 'mode-line "#2D2E2E") - (set-face-background 'mode-line-inactive "#333333") - ;; (set-face-foreground 'mode-line "#FFFFFF") - - ;; Fix linum current-line highlight - (defface my-linum-hl - '((t :background "gray20" :foreground "gold")) - "Face for the currently active Line number" - :group 'linum) - ) - - ;; Invoke color - (semidarkcolor) ;; default - ) - -(provide 'init-theme) - -;;; init-theme.el ends here diff --git a/modules/init-vscode-theme.el b/modules/init-vscode-theme.el new file mode 100644 index 0000000..022d583 --- /dev/null +++ b/modules/init-vscode-theme.el @@ -0,0 +1,46 @@ +;;; init-vscode-theme.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: + +(use-package vscode-dark-plus-theme + :pin "MELPA" + :ensure t + :config + (load-theme 'vscode-dark-plus t) + + (defun current-dark-color () + "Simple current-dark-color for theme." + (set-cursor-color "#2979FF") + (set-background-color "#1C1E1F") + + (set-face-foreground 'font-lock-string-face "#FFFFFF") + + ;; highlight + (set-face-foreground 'highlight "#F4F4F4") + (set-face-background 'highlight "#004575") + + ;; Modeline + (set-face-foreground 'mode-line "#FFFFFF") + (set-face-foreground 'mode-line-inactive "#f4f4f4") + (set-face-foreground 'mode-line-highlight "#f4f4f4") + + (set-face-background 'mode-line "#6a157e") + (set-face-background 'mode-line-inactive "#7B1FA2") + + (set-face-background 'fringe nil) + + ;; Fix linum current-line highlight + (defface my-linum-hl + '((t :background "#007acc" :foreground "#FFFFFF")) + "Face for the currently active Line number" + :group 'linum)) + + ;; Invoke color + (current-dark-color)) + +(provide 'init-vscode-theme) + +;; End: +;;; init-vscode-theme.el ends here -- cgit v1.2.3