Make custom frame-title-format less error-prone
This commit is contained in:
parent
16da96f0b0
commit
643d6dd704
|
@ -1936,13 +1936,14 @@ I'd like to have just the buffer name, then if applicable the project folder
|
||||||
(setq frame-title-format
|
(setq frame-title-format
|
||||||
'(""
|
'(""
|
||||||
(:eval
|
(:eval
|
||||||
(if (s-contains-p org-roam-directory (or buffer-file-name ""))
|
(if (string-match-p (regexp-quote (or (bound-and-true-p org-roam-directory) "\u0000"))
|
||||||
|
(or buffer-file-name ""))
|
||||||
(replace-regexp-in-string
|
(replace-regexp-in-string
|
||||||
".*/[0-9]*-?" "☰ "
|
".*/[0-9]*-?" "☰ "
|
||||||
(subst-char-in-string ?_ ? buffer-file-name))
|
(subst-char-in-string ?_ ?\s buffer-file-name))
|
||||||
"%b"))
|
"%b"))
|
||||||
(:eval
|
(:eval
|
||||||
(let ((project-name (projectile-project-name)))
|
(when-let ((project-name (and (featurep 'projectile) (projectile-project-name))))
|
||||||
(unless (string= "-" project-name)
|
(unless (string= "-" project-name)
|
||||||
(format (if (buffer-modified-p) " ◉ %s" " ● %s") project-name))))))
|
(format (if (buffer-modified-p) " ◉ %s" " ● %s") project-name))))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
Loading…
Reference in a new issue