Function: doom-modeline-segment--grip
doom-modeline-segment--grip is a natively compiled function defined in
doom-modeline-segments.el.
Signature
(doom-modeline-segment--grip)
Documentation
grip modeline segment
Source Code
;; Defined in /nix/store/1lcicrdd2r4b8rkc91nnn74ymk1jl6yd-emacs-packages-deps/share/emacs/site-lisp/elpa/doom-modeline-20260928.1632/doom-modeline-segments.el
;;
;; Markdown/Org preview
;;
(doom-modeline-def-segment grip
(when (bound-and-true-p grip-mode)
(let ((sep (doom-modeline-spc)))
(concat
sep
(let ((face (doom-modeline-face
(if grip--process
(pcase (process-status grip--process)
('run 'doom-modeline-info)
('exit 'doom-modeline-warning)
(_ 'doom-modeline-urgent))
'doom-modeline-urgent))))
(propertize
(doom-modeline-icon 'codicon "nf-cod-preview" "🗐" "@" :face face)
'help-echo (format "Preview on %s
mouse-1: Preview in browser
mouse-2: Stop preview
mouse-3: Restart preview"
(grip--preview-url))
'mouse-face 'doom-modeline-highlight
'local-map (let ((map (make-sparse-keymap)))
(define-key map [mode-line mouse-1]
#'grip-browse-preview)
(define-key map [mode-line mouse-2]
#'grip-stop-preview)
(define-key map [mode-line mouse-3]
#'grip-restart-preview)
map)))
sep))))