Add perspective

This commit is contained in:
Wojciech Kozlowski 2018-07-08 14:03:10 +01:00
parent 7f964b839e
commit 4fe13a3ddb
3 changed files with 35 additions and 7 deletions

View File

@ -35,8 +35,33 @@
:hook
(after-init . doom-modeline-init)
:config
(setq-default doom-modeline-height 23))
(setq-default doom-modeline-height 23)
;; Add perspective to modeline
(doom-modeline-def-segment perspectives
"Perspectives list and selection. Requires `persp-mode' to be enabled."
(if (and (bound-and-true-p persp-mode)
(< 1 (hash-table-count (perspectives-hash))))
(persp-mode-line)
""))
;; Set the modeline
(doom-modeline-def-modeline main
(perspectives
workspace-number
bar
matches
" "
buffer-info
" %l:%c %p "
selection-info)
(buffer-encoding
major-mode
vcs
flycheck))
)
)
(provide 'em-modeline)

View File

@ -20,9 +20,9 @@
(defvar emodule/em-workflow-packages
'(workgroups2)
'(perspective)
)
)
;;; Configuration:
@ -30,12 +30,12 @@
"Initialise the `em-workflow' module."
;; --------------------------------------------------------------------------
;; Enable `workgroups'.
;; Enable `perspective'.
;; --------------------------------------------------------------------------
(use-package workgroups2
:bind
(("C-c z z" . (lambda () (interactive) (workgroups-mode)))))
(use-package perspective
:config
(persp-mode))
)

View File

@ -433,6 +433,9 @@
`(flycheck-warning ((t (:underline (:style line :color "DarkOrange")))))
`(flycheck-info ((t (:underline (:style line :color "ForestGreen")))))
;; perspective
`(persp-selected-face ((t (:weight bold :foreground ,*head1*))))
)
;; Define values for colours that don't use faces.