Stylizes tabbar; extends emacs config

This commit is contained in:
William Carroll 2017-07-01 15:50:38 -04:00
parent e812876dd3
commit 296fe1b8f6
2 changed files with 70 additions and 14 deletions

View file

@ -40,7 +40,7 @@
'(org-fontify-whole-heading-line t) '(org-fontify-whole-heading-line t)
'(package-selected-packages '(package-selected-packages
(quote (quote
(nlinum tabbar rainbow-delimiters s font-lock+ f diminish dash avy all-the-icons dired+ linum-off git markdown-mode yaml-mode haskell-mode color-theme-sanityinc-tomorrow graphql-mode flycheck-elm popup-kill-ring green-phosphor-theme green-screen-theme minimal-theme creamsody-theme autothemer solarized-theme avk-emacs-themes github-theme all-the-icons-dired ace-window yasnippet chess synonyms powerline doom-neotree doom-themes persp-mode use-package helm-projectile persp-projectile perspective projectile with-editor helm-core company helm-ag evil-leader flycheck-mix flycheck-elixir evil-matchit typescript-mode evil-surround erlang elixir-mode golden-ratio flycheck-credo flycheck command-log-mode atom-one-dark-theme exec-path-from-shell clues-theme gotham-theme dracula-theme zenburn-theme fill-column-indicator neotree evil iedit vimrc-mode helm-ispell transpose-frame helm-ack nyan-mode alchemist helm dockerfile-mode elm-mode ack))) (swiper ivy nlinum tabbar rainbow-delimiters s font-lock+ f diminish dash avy all-the-icons dired+ linum-off git markdown-mode yaml-mode haskell-mode color-theme-sanityinc-tomorrow graphql-mode flycheck-elm popup-kill-ring green-phosphor-theme green-screen-theme minimal-theme creamsody-theme autothemer solarized-theme avk-emacs-themes github-theme all-the-icons-dired ace-window yasnippet chess synonyms powerline doom-neotree doom-themes persp-mode use-package helm-projectile persp-projectile perspective projectile with-editor helm-core company helm-ag evil-leader flycheck-mix flycheck-elixir evil-matchit typescript-mode evil-surround erlang elixir-mode golden-ratio flycheck-credo flycheck command-log-mode atom-one-dark-theme exec-path-from-shell clues-theme gotham-theme dracula-theme zenburn-theme fill-column-indicator neotree evil iedit vimrc-mode helm-ispell transpose-frame helm-ack nyan-mode alchemist helm dockerfile-mode elm-mode ack)))
'(popwin-mode t) '(popwin-mode t)
'(popwin:popup-window-height 25) '(popwin:popup-window-height 25)
'(popwin:special-display-config '(popwin:special-display-config
@ -56,6 +56,8 @@
("^*helm .+*$" :regexp t) ("^*helm .+*$" :regexp t)
("^*helm-.+*$" :regexp t) ("^*helm-.+*$" :regexp t)
("^*helm .+*$" :regexp t) ("^*helm .+*$" :regexp t)
("^*helm-.+*$" :regexp t)
("^*helm .+*$" :regexp t)
("^*helm .+*$" :regexp t) ("^*helm .+*$" :regexp t)
("*Miniedit Help*" :noselect t) ("*Miniedit Help*" :noselect t)
(completion-list-mode :noselect t) (completion-list-mode :noselect t)
@ -168,14 +170,23 @@
(add-hook 'minibuffer-setup-hook #'solaire-mode-in-minibuffer)) (add-hook 'minibuffer-setup-hook #'solaire-mode-in-minibuffer))
;; Colorized delimiters
(use-package rainbow-delimiters
:ensure t
:config
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode))
;; Colorscheme ;; Colorscheme
(use-package doom-themes (use-package doom-themes
:ensure t :ensure t
:config :config
(setq doom-themes-enable-bold nil (setq doom-themes-enable-bold nil
doom-themes-enable-italic nil) doom-themes-enable-italic nil)
(load-theme 'doom-molokai) (load-theme 'doom-one)
(doom-themes-neotree-config)) (doom-themes-visual-bell-config)
(doom-themes-neotree-config)
(load "~/.emacs.d/wc-doom-functions.el"))
;; Nyan cat ;; Nyan cat
@ -237,7 +248,10 @@
;; All-the-fonts ;; All-the-fonts
(use-package all-the-icons (use-package all-the-icons
:ensure t) :ensure t
:config
;; (all-the-icons-install-fonts)
)
;; Thesaurus ;; Thesaurus
@ -245,13 +259,6 @@
:ensure t) :ensure t)
;; Doom Themes
(use-package doom-themes
:ensure t
:init
(use-package doom-nlinum))
;; View stream of Emacs commands ;; View stream of Emacs commands
(use-package command-log-mode (use-package command-log-mode
:ensure t :ensure t
@ -346,7 +353,8 @@
:map evil-normal-state-map :map evil-normal-state-map
("<return>" . nil) ("<return>" . nil)
([tab] . nil) ([tab] . tabbar-forward-tab)
([backtab] . tabbar-backward-tab)
("K" . nil) ("K" . nil)
("M-." . nil) ("M-." . nil)
("s" . nil) ("s" . nil)
@ -383,6 +391,7 @@
(setq evil-replace-state-cursor '("VioletRed3" bar)) (setq evil-replace-state-cursor '("VioletRed3" bar))
(setq evil-operator-state-cursor '("VioletRed3" hollow)) (setq evil-operator-state-cursor '("VioletRed3" hollow))
(evil-ex-define-cmd (kbd "w") 'save-buffer-always) (evil-ex-define-cmd (kbd "w") 'save-buffer-always)
(evil-ex-define-cmd (kbd "qb") 'kill-this-buffer)
;; center search results ;; center search results
(defadvice evil-search-next (defadvice evil-search-next
@ -424,6 +433,7 @@
"x" 'helm-M-x "x" 'helm-M-x
"<SPC>" 'wc/switch-to-mru-buffer "<SPC>" 'wc/switch-to-mru-buffer
"a" 'ace-delete-window "a" 'ace-delete-window
"l" 'global-linum-mode
"s" 'ace-swap-window "s" 'ace-swap-window
"n" 'neotree-toggle-project-dir "n" 'neotree-toggle-project-dir
"N" 'neotree-reveal-current-buffer "N" 'neotree-reveal-current-buffer
@ -507,6 +517,8 @@
:bind (:map neotree-mode-map :bind (:map neotree-mode-map
("j" . next-line) ("j" . next-line)
("k" . previous-line) ("k" . previous-line)
("g" . beginning-of-buffer)
("G" . end-of-buffer)
("<return>" . neotree-enter) ("<return>" . neotree-enter)
([tab] . neotree-enter) ([tab] . neotree-enter)
("D" . neotree-delete-node) ("D" . neotree-delete-node)
@ -540,8 +552,6 @@
("C-x C-f" . helm-find-files) ("C-x C-f" . helm-find-files)
:map helm-map :map helm-map
([backtab] . helm-previous-source)
([tab] . helm-next-source)
("C-j" . helm-next-line) ("C-j" . helm-next-line)
("C-k" . helm-previous-line) ("C-k" . helm-previous-line)
("C-z" . helm-select-action) ("C-z" . helm-select-action)

View file

@ -0,0 +1,46 @@
(defun make-xpm-bar (color height width)
"Create an XPM bitmap of a bar."
(propertize
" " 'display
(let ((data (make-list height (make-list width 1)))
(color (or color "None")))
(create-image
(concat
(format "/* XPM */\nstatic char * percent[] = {\n\"%i %i 2 1\",\n\". c %s\",\n\" c %s\","
(length (car data))
(length data)
color
color)
(apply #'concat
(cl-loop with idx = 0
with len = (length data)
for dl in data
do (cl-incf idx)
collect
(concat "\""
(cl-loop for d in dl
if (= d 0) collect (string-to-char " ")
else collect (string-to-char "."))
(if (eq idx len) "\"};" "\",\n")))))
'xpm t :ascent 'center))))
(defun my-tabbar-display-tab (tab)
(let ((label (if tabbar--buffer-show-groups
(format "[%s]" (tabbar-tab-tabset tab))
(format "%s" (tabbar-tab-value tab))))
(bar-color "#51afef")
(bar-height 25)
(bar-width 3)
(selected-p (eq tab (tabbar-selected-tab (tabbar-current-tabset)))))
(concat (when (and (display-graphic-p) selected-p)
(make-xpm-bar bar-color bar-height bar-width))
" "
(if tabbar-auto-scroll-flag
label
(tabbar-shorten
label (max 1 (/ (window-width)
(length (tabbar-view
(tabbar-current-tabset)))))))
" ")))
(setq tabbar-tab-label-function #'my-tabbar-display-tab)