doom: Update window title, include projectile if needed

This commit is contained in:
Payas Relekar 2023-12-25 22:12:39 +05:30
parent 76ede3edde
commit 01e585722d

View file

@ -1324,3 +1324,19 @@ When Emacs is opened in Windows Subsystem for Linux, open web links in Firefox o
# Local Variables:
# jinx-local-words: "lockfiles"
# 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