2021-02-07 20:15:27 +08:00
|
|
|
;;; app/everywhere/config.el -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
(use-package! emacs-everywhere
|
2021-02-21 14:43:15 -05:00
|
|
|
;; Entry points into this package are autoloaded; i.e. the `emacs-everywhere'
|
|
|
|
;; function, meant to be called directly via emacsclient. See this module's
|
|
|
|
;; readme for details.
|
|
|
|
:defer t
|
2021-02-07 20:15:27 +08:00
|
|
|
:config
|
2021-02-21 14:43:35 -05:00
|
|
|
(set-yas-minor-mode! 'emacs-everywhere-mode)
|
|
|
|
|
2022-04-22 14:48:24 +02:00
|
|
|
;; HACK Inhibit MAJOR-MODE-local-vars-hook in emacs-everywhere buffers,
|
|
|
|
;; because Doom commonly starts servers and other extraneous services on
|
|
|
|
;; this hook, which will rarely work well in emacs-everywhere's temporary
|
|
|
|
;; buffers anyway.
|
|
|
|
(setq-hook! 'emacs-everywhere-init-hooks doom-inhibit-local-var-hooks t)
|
|
|
|
|
2021-02-07 20:15:27 +08:00
|
|
|
(after! doom-modeline
|
|
|
|
(doom-modeline-def-segment emacs-everywhere
|
2021-03-03 15:52:55 -05:00
|
|
|
(concat
|
|
|
|
(doom-modeline-spc)
|
|
|
|
(when (emacs-everywhere-markdown-p)
|
|
|
|
(concat
|
2023-09-14 00:03:55 +01:00
|
|
|
(nerd-icons-octicon "nf-oct-markdown" :face 'nerd-icons-green :v-adjust 0.02)
|
2021-03-03 15:52:55 -05:00
|
|
|
(doom-modeline-spc)))
|
|
|
|
(propertize (emacs-everywhere-app-class emacs-everywhere-current-app)
|
|
|
|
'face 'doom-modeline-project-dir)
|
|
|
|
(doom-modeline-spc)
|
|
|
|
(propertize (truncate-string-to-width
|
|
|
|
(emacs-everywhere-app-title emacs-everywhere-current-app)
|
|
|
|
45 nil nil "…")
|
|
|
|
'face 'doom-modeline-buffer-minor-mode)))
|
2021-02-07 20:15:27 +08:00
|
|
|
(doom-modeline-def-modeline 'emacs-everywhere
|
2023-02-17 18:13:29 +08:00
|
|
|
'(bar modals emacs-everywhere buffer-position
|
|
|
|
word-count parrot selection-info)
|
|
|
|
'(input-method major-mode checker
|
|
|
|
#(" " 0 1 ; "Exit to app" icon + a little padding
|
|
|
|
(rear-nonsticky t
|
|
|
|
display (raise -0.25)
|
|
|
|
face (:inherit doom-modeline-emphasis :family "Material Icons" :height 1.1)
|
|
|
|
help-echo "This is an Emacs Everywhere window"))))
|
2021-03-03 15:52:55 -05:00
|
|
|
(add-hook! 'emacs-everywhere-mode-hook
|
2021-02-25 13:56:41 -05:00
|
|
|
(defun +everywhere-set-modeline ()
|
|
|
|
(doom-modeline-set-modeline 'emacs-everywhere))))
|
|
|
|
(add-hook! 'emacs-everywhere-init-hooks
|
|
|
|
(defun +everywhere-clear-persp-info-h ()
|
|
|
|
(when (bound-and-true-p persp-mode)
|
2021-05-21 23:08:15 -04:00
|
|
|
(setq persp-emacsclient-init-frame-behaviour-override nil)))))
|