Config: start customize theme with autotheme, update init-kbd.el
This commit is contained in:
@@ -143,6 +143,9 @@ Disable jinx-mode if it's enable and global-jinx-mode is disable , otherwise tog
|
|||||||
|
|
||||||
;; 关闭主题
|
;; 关闭主题
|
||||||
(global-set-key (kbd "C-c u d") 'disable-theme)
|
(global-set-key (kbd "C-c u d") 'disable-theme)
|
||||||
|
(global-set-key (kbd "C-c u f") 'describe-face)
|
||||||
|
(global-set-key (kbd "C-c u c") 'my-color-picker)
|
||||||
|
(global-set-key (kbd "C-c u r") 'rainbow-mode)
|
||||||
|
|
||||||
;; 打开ibuffer
|
;; 打开ibuffer
|
||||||
(global-set-key (kbd "C-x C-b") 'ibuffer-other-window)
|
(global-set-key (kbd "C-x C-b") 'ibuffer-other-window)
|
||||||
@@ -278,6 +281,12 @@ Disable jinx-mode if it's enable and global-jinx-mode is disable , otherwise tog
|
|||||||
|
|
||||||
(global-set-key (kbd "C-c f d") 'my-open-current-directory)
|
(global-set-key (kbd "C-c f d") 'my-open-current-directory)
|
||||||
|
|
||||||
|
;; save-some-buffer时diff更改
|
||||||
|
(add-to-list 'save-some-buffers-action-alist
|
||||||
|
(list "d"
|
||||||
|
(lambda (buffer) (diff-buffer-with-file (buffer-file-name buffer)))
|
||||||
|
"show diff between the buffer and its file"))
|
||||||
|
|
||||||
;; org-mode相关
|
;; org-mode相关
|
||||||
;; cycle当前subtree
|
;; cycle当前subtree
|
||||||
(defun org-cycle-current-subtree()
|
(defun org-cycle-current-subtree()
|
||||||
|
|||||||
@@ -16,6 +16,29 @@
|
|||||||
(set-language-environment "UTF-8")
|
(set-language-environment "UTF-8")
|
||||||
(prefer-coding-system 'utf-8)))
|
(prefer-coding-system 'utf-8)))
|
||||||
|
|
||||||
|
;; 安装autothemer
|
||||||
|
(use-package autothemer)
|
||||||
|
|
||||||
|
;; 预览所有可用emacs颜色
|
||||||
|
(defun my-color-picker ()
|
||||||
|
"Pick a color with preview."
|
||||||
|
(interactive)
|
||||||
|
(let* ((colors (defined-colors))
|
||||||
|
(choice (completing-read
|
||||||
|
"Color: "
|
||||||
|
(mapcar (lambda (c)
|
||||||
|
(propertize
|
||||||
|
(format "%-20s %s" c "████")
|
||||||
|
'face `(:foreground ,c)))
|
||||||
|
colors))))
|
||||||
|
(string-trim (car (split-string choice)))))
|
||||||
|
|
||||||
|
;; rainbow mode
|
||||||
|
(use-package rainbow-mode)
|
||||||
|
|
||||||
|
;; 自定义主题路径
|
||||||
|
(add-to-list 'custom-theme-load-path "c:/Users/gaozh/AppData/Roaming/.emacs.d/lisp/")
|
||||||
|
|
||||||
;; 安装solarized dark
|
;; 安装solarized dark
|
||||||
(use-package solarized-theme)
|
(use-package solarized-theme)
|
||||||
(load-theme 'solarized-dark t)
|
(load-theme 'solarized-dark t)
|
||||||
@@ -23,6 +46,7 @@
|
|||||||
;; 很多主题
|
;; 很多主题
|
||||||
(use-package doom-themes)
|
(use-package doom-themes)
|
||||||
(use-package color-theme-modern)
|
(use-package color-theme-modern)
|
||||||
|
(use-package naysayer-theme)
|
||||||
|
|
||||||
;; 信任所有主题
|
;; 信任所有主题
|
||||||
(setq custom-safe-themes t)
|
(setq custom-safe-themes t)
|
||||||
|
|||||||
29
lisp/my-theme.el
Normal file
29
lisp/my-theme.el
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
(require 'autothemer)
|
||||||
|
|
||||||
|
(autothemer-deftheme
|
||||||
|
hallo "A theme to set the mood for Halloween"
|
||||||
|
|
||||||
|
((((class color) (min-colors #xFFFFFF))) ;; We're only concerned with graphical Emacs
|
||||||
|
|
||||||
|
;; Define our color palette
|
||||||
|
(basic "#06261F")
|
||||||
|
( "#93A3B1")
|
||||||
|
(hallo-orange "orange1")
|
||||||
|
(hallo-dk-orange "#eb6123")
|
||||||
|
(hallo-purple "MediumPurple2")
|
||||||
|
(hallo-dk-purple "MediumPurple4")
|
||||||
|
(hallo-green "LightGreen"))
|
||||||
|
|
||||||
|
;; Customize faces
|
||||||
|
((default (:foreground hallo-white :background hallo-black))
|
||||||
|
(cursor (:background hallo-dk-orange))
|
||||||
|
(region (:background hallo-dk-purple))
|
||||||
|
(mode-line (:background hallo-dk-purple))
|
||||||
|
(font-lock-keyword-face (:foreground hallo-purple))
|
||||||
|
(font-lock-constant-face (:foreground hallo-green))
|
||||||
|
(font-lock-string-face (:foreground hallo-orange))
|
||||||
|
(font-lock-builtin-face (:foreground hallo-green))
|
||||||
|
|
||||||
|
(org-level-1 (:foreground hallo-orange))))
|
||||||
|
|
||||||
|
(provide-theme 'hallo)
|
||||||
Reference in New Issue
Block a user