mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 11:09:54 +00:00
Improve grip indicator.
This commit is contained in:
parent
2c01d9eb9e
commit
c4a77d12c3
1 changed files with 30 additions and 20 deletions
|
@ -66,6 +66,7 @@
|
|||
(defvar flymake--mode-line-format)
|
||||
(defvar flymake-menu)
|
||||
(defvar grip-port)
|
||||
(defvar grip-process)
|
||||
(defvar helm--mode-line-display-prefarg)
|
||||
(defvar iedit-occurrences-overlays)
|
||||
(defvar mc/mode-line)
|
||||
|
@ -2301,15 +2302,23 @@ The cdr can also be a function that returns a name to use.")
|
|||
(when (bound-and-true-p grip-mode)
|
||||
(concat
|
||||
(doom-modeline-spc)
|
||||
|
||||
(let ((face (if (doom-modeline--active)
|
||||
(if grip-process
|
||||
(pcase (process-status grip-process)
|
||||
('run 'all-the-icons-lblue)
|
||||
('exit 'warning)
|
||||
(_ 'error))
|
||||
'error)
|
||||
'mode-line-inactive)))
|
||||
(propertize
|
||||
(if (display-graphic-p)
|
||||
(doom-modeline-icon-material "pageview"
|
||||
:face (if (doom-modeline--active)
|
||||
'all-the-icons-lblue
|
||||
'mode-line-inactive)
|
||||
:height 1.1
|
||||
:v-adjust -0.225)
|
||||
"G")
|
||||
(if doom-modeline-icon
|
||||
(doom-modeline-icon-material
|
||||
"pageview"
|
||||
:face face
|
||||
:height 1.2
|
||||
:v-adjust -0.2)
|
||||
(propertize "G" 'face `(:inherit (,face bold))))
|
||||
'help-echo (format "Preview on: http://localhost:%d
|
||||
mouse-1: Open browser
|
||||
mouse-2: Stop preview"
|
||||
|
@ -2322,7 +2331,8 @@ mouse-2: Stop preview"
|
|||
(browse-url (format "http://localhost:%d" grip-port))))
|
||||
(define-key map [mode-line mouse-2]
|
||||
#'grip-mode)
|
||||
map))
|
||||
map)))
|
||||
|
||||
(doom-modeline-spc))))
|
||||
|
||||
(provide 'doom-modeline-segments)
|
||||
|
|
Loading…
Reference in a new issue