spaceline improved. lxdrive indicator added to spaceline
This commit is contained in:
parent
579cd2cc46
commit
507f3720bf
|
@ -1,3 +1,5 @@
|
||||||
|
;; Uncomment this for debugging purposes
|
||||||
|
;;(setq debug-on-error t)
|
||||||
;; THEME
|
;; THEME
|
||||||
;; =====
|
;; =====
|
||||||
;; Load the default theme
|
;; Load the default theme
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
; Customizations --------------------------------------------
|
;; Customizations --------------------------------------------
|
||||||
(defcustom fg42-todo-file "~/.TODO.org"
|
(defcustom fg42-todo-file "~/.TODO.org"
|
||||||
"Path to your TODO file. You can use a tramp address here as well."
|
"Path to your TODO file. You can use a tramp address here as well."
|
||||||
:type 'string
|
:type 'string
|
||||||
|
@ -31,8 +31,8 @@
|
||||||
(require 'extensions/editor/utils)
|
(require 'extensions/editor/utils)
|
||||||
|
|
||||||
;; Font Configuration -----------------------------------
|
;; Font Configuration -----------------------------------
|
||||||
(add-to-list 'default-frame-alist '(font . "Fira Mono" ))
|
(add-to-list 'default-frame-alist '(font . "Fira Mono"))
|
||||||
(set-face-attribute 'default t :font "Fira Mono" )
|
(set-face-attribute 'default t :font "Fira Mono")
|
||||||
;; ------------------------------------------------------
|
;; ------------------------------------------------------
|
||||||
|
|
||||||
(cheatsheet-add :group '--HELP--
|
(cheatsheet-add :group '--HELP--
|
||||||
|
@ -64,7 +64,31 @@
|
||||||
"A really cool mode line alternative which borrowed from awesome spacemacs"
|
"A really cool mode line alternative which borrowed from awesome spacemacs"
|
||||||
(require 'spaceline-config)
|
(require 'spaceline-config)
|
||||||
(require 'extensions/editor/spaceline-alt)
|
(require 'extensions/editor/spaceline-alt)
|
||||||
|
|
||||||
|
;; TODO: Move this to somewhere propriate
|
||||||
|
;; Modeline indicator for lxdrive
|
||||||
|
(spaceline-define-segment lxdrive
|
||||||
|
"lxdrive indicator on spaceline."
|
||||||
|
(if (and (boundp 'lxdrive-minor-mode) lxdrive-minor-mode)
|
||||||
|
(all-the-icons-faicon "arrows" :height 0.8 :v-adjust 0.1 :face 'all-the-icons-lgreen)
|
||||||
|
(all-the-icons-faicon "pencil" :height 0.8 :v-adjust 0.1 :face 'all-the-icons-blue)))
|
||||||
|
|
||||||
|
(spaceline-compile
|
||||||
|
"ati"
|
||||||
|
'(
|
||||||
|
((ati-modified ati-window-numbering ati-buffer-size) :face highlight-face :skip-alternate t)
|
||||||
|
((ati-projectile ati-mode-icon ati-buffer-id) :face default-face)
|
||||||
|
((ati-process ati-position ati-region-info) :face highlight-face :separator " | ")
|
||||||
|
((ati-vc-icon ati-flycheck-status ati-(point)ackage-updates purpose) :separator " · " :face other-face)
|
||||||
|
;; ((minor-modes) :face default-face)
|
||||||
|
)
|
||||||
|
|
||||||
|
'(((lxdrive ati-time) :separator " | " :face default-face)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(setq-default mode-line-format '("%e" (:eval (spaceline-ml-ati)))))
|
(setq-default mode-line-format '("%e" (:eval (spaceline-ml-ati)))))
|
||||||
|
|
||||||
;;(spaceline-emacs-theme))
|
;;(spaceline-emacs-theme))
|
||||||
|
|
||||||
;; Tramp configuration -------------------------------------
|
;; Tramp configuration -------------------------------------
|
||||||
|
@ -179,8 +203,7 @@
|
||||||
|
|
||||||
(flx-ido-mode 1)
|
(flx-ido-mode 1)
|
||||||
(setq ido-use-faces nil)
|
(setq ido-use-faces nil)
|
||||||
(setq ido-use-filename-at-point nil)
|
(setq ido-use-filename-at-point nil)
|
||||||
|
|
||||||
(setq ido-enable-flex-matching t)
|
(setq ido-enable-flex-matching t)
|
||||||
(ido-vertical-mode 1))
|
(ido-vertical-mode 1))
|
||||||
|
|
||||||
|
@ -227,8 +250,8 @@
|
||||||
|
|
||||||
;; Session Management ---------------------------------------
|
;; Session Management ---------------------------------------
|
||||||
(ability desktop-mode ()
|
(ability desktop-mode ()
|
||||||
"Save your current working buffers and restore later"
|
"Save your current working buffers and restore later"
|
||||||
(desktop-save-mode 1))
|
(desktop-save-mode 1))
|
||||||
|
|
||||||
;; Backup files ---------------------------------------------
|
;; Backup files ---------------------------------------------
|
||||||
;; Put them in one nice place if possible
|
;; Put them in one nice place if possible
|
||||||
|
@ -236,11 +259,11 @@
|
||||||
(setq backup-directory-alist '(("." . "~/.backup")))
|
(setq backup-directory-alist '(("." . "~/.backup")))
|
||||||
(make-directory "~/.backup"))
|
(make-directory "~/.backup"))
|
||||||
|
|
||||||
(setq backup-by-copying t ; Don't delink hardlinks
|
(setq backup-by-copying t) ; Don't delink hardlinks
|
||||||
delete-old-versions t ; Clean up the backups
|
delete-old-versions t ; Clean up the backups
|
||||||
version-control t ; Use version numbers on backups,
|
version-control t ; Use version numbers on backups,
|
||||||
kept-new-versions 3 ; keep some new versions
|
kept-new-versions 3 ; keep some new versions
|
||||||
kept-old-versions 2) ; and some old ones, too
|
kept-old-versions 2 ; and some old ones, too
|
||||||
|
|
||||||
;; get rid of yes-or-no questions - y or n is enough
|
;; get rid of yes-or-no questions - y or n is enough
|
||||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||||
|
|
|
@ -3,18 +3,18 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(setq original-global-map global-map)
|
(setq original-global-map global-map)
|
||||||
|
(boundp 'lxdrive-minor-mode)
|
||||||
|
|
||||||
(defun turn-off-lxdrive ()
|
(defun turn-off-lxdrive ()
|
||||||
"Toggle lxdrive mode"
|
"Toggle lxdrive mode"
|
||||||
(interactive)
|
(interactive)
|
||||||
(message "Turning lxdrive OFF")
|
|
||||||
(lxdrive-minor-mode nil)
|
(lxdrive-minor-mode nil)
|
||||||
|
(setq lxdrive-minor-mode nil)
|
||||||
(use-global-map original-global-map))
|
(use-global-map original-global-map))
|
||||||
|
|
||||||
(defun turn-on-lxdrive ()
|
(defun turn-on-lxdrive ()
|
||||||
"Toggle lxdrive mode"
|
"Toggle lxdrive mode"
|
||||||
(interactive)
|
(interactive)
|
||||||
(message "Turning lxdrive ON")
|
|
||||||
(lxdrive-minor-mode t)
|
(lxdrive-minor-mode t)
|
||||||
(use-global-map lxdrive-mode-map))
|
(use-global-map lxdrive-mode-map))
|
||||||
|
|
||||||
|
@ -76,7 +76,6 @@
|
||||||
|
|
||||||
(define-minor-mode lxdrive-minor-mode
|
(define-minor-mode lxdrive-minor-mode
|
||||||
"A minor mode so that my key settings override annoying major modes."
|
"A minor mode so that my key settings override annoying major modes."
|
||||||
:init-value t
|
|
||||||
:lighter " lx")
|
:lighter " lx")
|
||||||
|
|
||||||
|
|
||||||
|
@ -89,6 +88,6 @@
|
||||||
;;(lxdrive-minor-mode 1)
|
;;(lxdrive-minor-mode 1)
|
||||||
(global-set-key (kbd "ESC ESC") 'turn-on-lxdrive)
|
(global-set-key (kbd "ESC ESC") 'turn-on-lxdrive)
|
||||||
(global-set-key (kbd "M-SPC") 'turn-on-lxdrive)
|
(global-set-key (kbd "M-SPC") 'turn-on-lxdrive)
|
||||||
|
(spaceline-toggle-lxdrive-on)
|
||||||
(provide 'extensions/editor/lxdrive-mode)
|
(provide 'extensions/editor/lxdrive-mode)
|
||||||
;;; lxdrive-mode ends here
|
;;; lxdrive-mode ends here
|
||||||
|
|
|
@ -350,26 +350,26 @@ the directions of the separator."
|
||||||
(define-separator "right-1" "left" 'powerline-active2 'powerline-active1)
|
(define-separator "right-1" "left" 'powerline-active2 'powerline-active1)
|
||||||
(define-separator "right-2" "left" 'powerline-active1 'mode-line)
|
(define-separator "right-2" "left" 'powerline-active1 'mode-line)
|
||||||
|
|
||||||
(spaceline-compile
|
;; (spaceline-compile
|
||||||
"ati"
|
;; "ati"
|
||||||
'(
|
;; '(
|
||||||
((ati-modified ati-window-numbering ati-buffer-size) :face highlight-face :skip-alternate t)
|
;; ((ati-modified ati-window-numbering ati-buffer-size) :face highlight-face :skip-alternate t)
|
||||||
;; left-active-3
|
;; ;; left-active-3
|
||||||
ati-left-1-separator
|
;; ati-left-1-separator
|
||||||
((ati-projectile ati-mode-icon ati-buffer-id) :face default-face)
|
;; ((ati-projectile ati-mode-icon ati-buffer-id) :face default-face)
|
||||||
ati-left-2-separator
|
;; ati-left-2-separator
|
||||||
((ati-process ati-position ati-region-info) :face highlight-face :separator " | ")
|
;; ((ati-process ati-position ati-region-info) :face highlight-face :separator " | ")
|
||||||
ati-left-3-separator
|
;; ati-left-3-separator
|
||||||
ati-left-inactive-separator
|
;; ati-left-inactive-separator
|
||||||
((ati-vc-icon ati-flycheck-status ati-package-updates purpose) :separator " · " :face other-face)
|
;; ((ati-vc-icon ati-flycheck-status ati-package-updates purpose) :separator " · " :face other-face)
|
||||||
ati-left-4-separator)
|
;; ati-left-4-separator)
|
||||||
|
|
||||||
'(ati-right-1-separator
|
;; '(ati-right-1-separator
|
||||||
((ati-suntime ati-weather) :separator " · " :face other-face)
|
;; ((ati-suntime ati-weather) :separator " · " :face other-face)
|
||||||
ati-right-2-separator
|
;; ati-right-2-separator
|
||||||
ati-right-inactive-separator
|
;; ati-right-inactive-separator
|
||||||
((ati-battery-status ati-time) :separator " | " :face other-face)
|
;; ((ati-battery-status ati-time) :separator " | " :face other-face)
|
||||||
))
|
;; ))
|
||||||
|
|
||||||
;; (setq mode-line-format '("%e" (:eval (spaceline-ml-main))))
|
;; (setq mode-line-format '("%e" (:eval (spaceline-ml-main))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue