better modeline/colors
This commit is contained in:
34
init.el
34
init.el
@@ -1,4 +1,4 @@
|
||||
;;(package-initialize)
|
||||
(package-initialize)
|
||||
|
||||
(defun byte-compile-init-dir ()
|
||||
"Byte-compile all your dotfiles."
|
||||
@@ -19,19 +19,27 @@
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(haskell-process-suggest-remove-import-lines t)
|
||||
'(haskell-process-auto-import-loaded-modules t)
|
||||
'(haskell-process-log t)
|
||||
'(haskell-process-type 'cabal-repl)
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(swiper colemak-evil evil all-the-icons use-package rich-minority projectile mode-icons magit-find-file haskell-mode gruvbox-theme fill-column-indicator evil-magit counsel))))
|
||||
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(term-color-black ((t (:foreground "#525252"))))
|
||||
'(term-color-blue ((t (:foreground "#33ddff"))))
|
||||
'(term-color-cyan ((t (:foreground "#196f80"))))
|
||||
'(term-color-green ((t (:foreground "#bf4c26"))))
|
||||
'(term-color-magenta ((t (:foreground "#26a6bf"))))
|
||||
'(term-color-red ((t (:foreground "#ff6633"))))
|
||||
'(term-color-white ((t (:foreground "#bfbfbf"))))
|
||||
'(term-color-yellow ((t (:foreground "#803319")))))
|
||||
'(mode-line ((t (:background " "))))
|
||||
'(linum ((t (:underline nil))))
|
||||
)
|
||||
;; ;; custom-set-faces was added by Custom.
|
||||
;; ;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; ;; Your init file should contain only one such instance.
|
||||
;; ;; If there is more than one, they won't work right.
|
||||
;; '(term-color-black ((t (:foreground "#525252"))))
|
||||
;; '(term-color-blue ((t (:foreground "#33ddff"))))
|
||||
;; '(term-color-cyan ((t (:foreground "#196f80"))))
|
||||
;; '(term-color-green ((t (:foreground "#bf4c26"))))
|
||||
;; '(term-color-magenta ((t (:foreground "#26a6bf"))))
|
||||
;; '(term-color-red ((t (:foreground "#ff6633"))))
|
||||
;; '(term-color-white ((t (:foreground "#bfbfbf"))))
|
||||
;; '(term-color-yellow ((t (:foreground "#803319")))))
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
(count-lines
|
||||
(point-min)
|
||||
(point-max))))))
|
||||
(concat "%" (number-to-string w) "d "))))))
|
||||
(concat " %" (number-to-string w) "d "))))))
|
||||
|
||||
|
||||
(defun linum-format-func (line)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
(load "~/.emacs.d/my-packages.elc")
|
||||
(load "~/.emacs.d/my-packages.el")
|
||||
|
||||
(require 'use-package)
|
||||
|
||||
@@ -32,3 +32,5 @@
|
||||
:init
|
||||
(setq fci-rule-column 80))
|
||||
(use-package all-the-icons)
|
||||
(use-package haskell-mode)
|
||||
(use-package ghc)
|
||||
|
||||
@@ -2,28 +2,35 @@
|
||||
(require 'magit)
|
||||
(require 'all-the-icons)
|
||||
|
||||
|
||||
(defvar powerline-current-window nil)
|
||||
(defun update-current-window (windows)
|
||||
(when (not (minibuffer-window-active-p (frame-selected-window)))
|
||||
(setq powerline-current-window (selected-window))))
|
||||
(add-function :before pre-redisplay-function 'update-current-window)
|
||||
|
||||
|
||||
(defun evil-tag-color ()
|
||||
(if (eq (get-buffer-window) powerline-current-window)
|
||||
(cond ((evil-normal-state-p) "#86261c")
|
||||
(cond ((evil-normal-state-p) "DodgerBlue4")
|
||||
((evil-visual-state-p) "DarkSlateGray")
|
||||
((evil-insert-state-p) "#ff2222")
|
||||
((evil-insert-state-p) "maroon")
|
||||
((evil-emacs-state-p) "SeaGreen")
|
||||
((evil-operator-state-p) "SeaGreen")
|
||||
((evil-motion-state-p) "SeaGreen")
|
||||
((evil-replace-state-p) "#ff2222"))
|
||||
((evil-replace-state-p) "maroon"))
|
||||
(face-background 'mode-line-inactive)))
|
||||
|
||||
(defun branch-tag-bg-color ()
|
||||
(if (eq (get-buffer-window) powerline-current-window)
|
||||
"#424242"
|
||||
"gainsboro"
|
||||
(face-background 'mode-line-inactive)))
|
||||
|
||||
(defun branch-tag-fg-color ()
|
||||
(if (eq (get-buffer-window) powerline-current-window)
|
||||
"#181818"
|
||||
(face-foreground 'mode-line-inactive)))
|
||||
|
||||
(defun time-tag-bg-color ()
|
||||
(if (eq (get-buffer-window) powerline-current-window)
|
||||
"ivory"
|
||||
@@ -74,7 +81,9 @@ can be used to add a number of spaces to the front and back of the string."
|
||||
(when (magit-get-current-branch)
|
||||
(propertize
|
||||
(format " %s " (magit-get-current-branch))
|
||||
'face `(:weight bold :background ,(branch-tag-bg-color)))))))
|
||||
'face `(:weight bold
|
||||
:foreground ,(branch-tag-fg-color)
|
||||
:background ,(branch-tag-bg-color)))))))
|
||||
|
||||
(defun powerline-modified ()
|
||||
(let* ((config-alist
|
||||
@@ -109,19 +118,19 @@ can be used to add a number of spaces to the front and back of the string."
|
||||
(let* ((bg (time-tag-bg-color))
|
||||
(fg (time-tag-fg-color)))
|
||||
(concat
|
||||
;; (propertize
|
||||
;; (all-the-icons-faicon "rebel")
|
||||
;; 'face
|
||||
;; `(:height 0.8 :background ,bg :foreground ,fg) 'display '(raise 0.2))
|
||||
(propertize
|
||||
(all-the-icons-faicon "rebel")
|
||||
'face
|
||||
`(:height 0.8 :background ,bg :foreground ,fg) 'display '(raise 0.2))
|
||||
(propertize
|
||||
(format " %%l/%d "
|
||||
(format " %%l/%d "
|
||||
(count-lines (point-min) (point-max)))
|
||||
'face `(:background ,bg :foreground ,fg)))))
|
||||
|
||||
(defun powerline-time ()
|
||||
(let* ((hour (string-to-number (format-time-string "%I")))
|
||||
(icon (all-the-icons-wicon
|
||||
(format "time-%s" hour) :height 1.0 :v-adjust 0.0))
|
||||
;; (icon (all-the-icons-wicon
|
||||
;; (format "time-%s" hour) :height 1.0 :v-adjust 0.0))
|
||||
(bg (time-tag-bg-color))
|
||||
(fg (time-tag-fg-color)))
|
||||
(concat
|
||||
@@ -129,13 +138,13 @@ can be used to add a number of spaces to the front and back of the string."
|
||||
(format-time-string " %H:%M ")
|
||||
'face
|
||||
`(:height 1.0 :background ,bg :foreground ,fg))
|
||||
;; (propertize
|
||||
;; (format "%s" icon)
|
||||
;; 'face
|
||||
;; `(:height 1.0 :family "Weather Icons" :background ,bg :foreground ,fg)
|
||||
;; 'display '(raise -0.0))
|
||||
(propertize
|
||||
(format "%s" icon)
|
||||
'face
|
||||
`(:height 1.0 :family "Weather Icons" :background ,bg :foreground ,fg)
|
||||
'display '(raise -0.0))
|
||||
(propertize
|
||||
" · "
|
||||
"·"
|
||||
'face `(:height 1.0 :background ,bg :foreground ,fg)))))
|
||||
|
||||
(defvar separator-left
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
(when (fboundp 'menu-bar-mode) (menu-bar-mode -1))
|
||||
(when (fboundp 'tool-bar-mode) (tool-bar-mode -1))
|
||||
(when (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
|
||||
(when (fboundp 'windmove-default-keybindings)
|
||||
(windmove-default-keybindings))
|
||||
(autoload 'ghc-init "ghc" nil t)
|
||||
(autoload 'ghc-debug "ghc" nil t)
|
||||
(add-hook 'haskell-mode-hook (lambda () (ghc-init)))
|
||||
(add-to-list 'exec-path "~/.cabal/bin")
|
||||
(add-to-list
|
||||
'default-frame-alist
|
||||
'(font . "-ypn-envypn-medium-r-normal--15-150-75-75-c-90-iso8859-1"))
|
||||
'(font . "Iosevka Term 10"))
|
||||
(set-frame-font
|
||||
"-ypn-envypn-medium-r-normal--15-150-75-75-c-90-iso8859-1")
|
||||
"Iosevka Term 10")
|
||||
(setq frame-title-format
|
||||
'(buffer-file-name "%f"
|
||||
(dired-directory dired-directory "%b")))
|
||||
(fringe-mode '(0 . 0))
|
||||
(setq inhibit-startup-screen t)
|
||||
(setq vc-follow-symlinks t)
|
||||
@@ -72,3 +81,16 @@
|
||||
(process-send-string
|
||||
(get-buffer-process (current-buffer))
|
||||
(if string string (current-kill 0))))
|
||||
|
||||
(eval-after-load 'haskell-mode '(progn
|
||||
(define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-or-reload)
|
||||
(define-key haskell-mode-map (kbd "C-c C-z") 'haskell-interactive-switch)
|
||||
(define-key haskell-mode-map (kbd "C-c C-n C-t") 'haskell-process-do-type)
|
||||
(define-key haskell-mode-map (kbd "C-c C-n C-i") 'haskell-process-do-info)
|
||||
(define-key haskell-mode-map (kbd "C-c C-n C-c") 'haskell-process-cabal-build)
|
||||
(define-key haskell-mode-map (kbd "C-c C-n c") 'haskell-process-cabal)))
|
||||
(eval-after-load 'haskell-cabal '(progn
|
||||
(define-key haskell-cabal-mode-map (kbd "C-c C-z") 'haskell-interactive-switch)
|
||||
(define-key haskell-cabal-mode-map (kbd "C-c C-k") 'haskell-interactive-mode-clear)
|
||||
(define-key haskell-cabal-mode-map (kbd "C-c C-c") 'haskell-process-cabal-build)
|
||||
(define-key haskell-cabal-mode-map (kbd "C-c c") 'haskell-process-cabal)))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
(defvar my:theme 'nothing-rhymes-with-orange)
|
||||
(defvar my:theme 'base16-default-dark)
|
||||
(defvar my:theme-window-loaded nil)
|
||||
(defvar my:theme-terminal-loaded nil)
|
||||
(if (daemonp)
|
||||
@@ -8,7 +8,7 @@
|
||||
(select-frame frame)
|
||||
(when (window-system frame)
|
||||
(set-frame-parameter
|
||||
(selected-frame) 'internal-border-width 5)
|
||||
(selected-frame) 'internal-border-width 0)
|
||||
(unless my:theme-window-loaded
|
||||
(if my:theme-terminal-loaded
|
||||
(enable-theme my:theme)
|
||||
@@ -24,7 +24,7 @@
|
||||
(if (display-graphic-p)
|
||||
(setq my:theme-window-loaded t)
|
||||
(setq my:theme-terminal-loaded t)))
|
||||
(set-frame-parameter (selected-frame) 'internal-border-width 5))
|
||||
(set-frame-parameter (selected-frame) 'internal-border-width 0))
|
||||
|
||||
(custom-set-faces
|
||||
;; term
|
||||
@@ -48,4 +48,4 @@
|
||||
(add-hook 'before-make-frame-hook
|
||||
#'(lambda ()
|
||||
(add-to-list 'default-frame-alist '(height . 42))
|
||||
(add-to-list 'default-frame-alist '(width . 84))))
|
||||
(add-to-list 'default-frame-alist '(width . 100))))
|
||||
|
||||
Reference in New Issue
Block a user