doom-modeline has been added

This commit is contained in:
Sameer Rahmani 2019-08-13 17:38:22 +01:00
parent 89e33c9797
commit ab8a3499d6
4 changed files with 31 additions and 24 deletions

View File

@ -31,7 +31,8 @@
(with-ability git
(depends-on 'diff-hl)
(depends-on 'magit))
(depends-on 'magit)
(depends-on 'gh))
(with-ability github
(depends-on 'magithub))

View File

@ -37,6 +37,9 @@
(with-ability spaceline
(depends-on 'spaceline))
(with-ability doom-modeline
(depends-on 'doom-modeline))
(with-ability guru
(depends-on 'guru-mode))

View File

@ -1,34 +1,33 @@
;;; lxmode-line --- A small utility library to toggle the modeline.
;;; Commentary:
;;; Code:
(defvar hidden-modeline nil)
(require 'doom-modeline)
(defun hide-modeline ()
"Hide the mode-line."
(interactive)
(message "Hidding mode-line...")
(setq hidden-modeline mode-line-format)
(setq mode-line-format nil))
(defun show-modeline ()
"Show the mode-line."
(interactive)
(message "Showing mode-line...")
(setq mode-line-format hidden-modeline)
(setq hidden-modeline nil))
(doom-modeline-def-segment lxdrive-info
"Show the status of lxdrive mode"
(if (and (boundp 'lxdrive-minor-mode) lxdrive-minor-mode)
(list " " (all-the-icons-faicon "arrows" :height 0.8 :v-adjust 0.15 :face 'all-the-icons-lgreen))
(list " " (all-the-icons-faicon "pencil" :height 0.8 :v-adjust 0.15))))
(defun toggle-modeline ()
"Toggle the modeline."
(interactive)
(if (not hidden-modeline)
(hide-modeline)
(show-modeline)))
(doom-modeline-def-modeline 'fg42-mode-line
'(bar lxdrive-info matches buffer-info buffer-position parrot selection-info)
'(process vcs checker))
(ability togglable-modeline ()
"Togglable modeline"
(global-set-key (kbd "<f6>") 'toggle-modeline))
(defun setup-custom-doom-modeline ()
"Setup fg42 modeline."
(doom-modeline-set-modeline 'fg42-mode-line 'default))
(with-ability doom-modeline
(add-hook 'doom-modeline-mode-hook 'setup-custom-doom-modeline)
(setq doom-modeline-height 15)
(setq doom-modeline-buffer-encoding nil)
(setq doom-modeline-lsp nil)
(setq doom-modeline-mu4e nil)
(setq doom-modeline-irc nil)
(setq doom-modeline-buffer-file-name-style 'truncate-with-project)
(doom-modeline-mode t))
(provide 'extensions/editor/lxmodeline)
;;; lxmodeline ends here

View File

@ -20,9 +20,13 @@
name
docs
(version nil)
;; Describes
(major-modes nil)
;; Callbacks
(on-initialize nil)
(on-load)
;; An associated array of major modes to their
;; debugger function
(print-debugger nil))