doom: Update window title, include projectile if needed
This commit is contained in:
parent
76ede3edde
commit
01e585722d
1 changed files with 16 additions and 0 deletions
|
@ -1324,3 +1324,19 @@ When Emacs is opened in Windows Subsystem for Linux, open web links in Firefox o
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
# jinx-local-words: "lockfiles"
|
# jinx-local-words: "lockfiles"
|
||||||
# End:
|
# End:
|
||||||
|
** Window Title
|
||||||
|
#+begin_src emacs-lisp :lexical t
|
||||||
|
(setq frame-title-format
|
||||||
|
'(""
|
||||||
|
(:eval
|
||||||
|
(if (string-match-p (regexp-quote (or (bound-and-true-p org-roam-directory) "\u0000"))
|
||||||
|
(or buffer-file-name ""))
|
||||||
|
(replace-regexp-in-string
|
||||||
|
".*/[0-9]*-?" "☰ "
|
||||||
|
(subst-char-in-string ?_ ?\s buffer-file-name))
|
||||||
|
"%b"))
|
||||||
|
(:eval
|
||||||
|
(when-let ((project-name (and (featurep 'projectile) (projectile-project-name))))
|
||||||
|
(unless (string= "-" project-name)
|
||||||
|
(format (if (buffer-modified-p) " ○ %s" " ∙ %s") project-name))))))
|
||||||
|
#+end_src
|
||||||
|
|
Reference in a new issue