Skip to content

Commit

Permalink
tweak(window): change frame-title-format
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Feb 14, 2024
1 parent e845bcb commit 0ea96fb
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions modules/me-window.el
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,19 @@
(window-width . 0.5)
(reusable-frames . visible)))

(setq
frame-title-format
'("%b"
(:eval
(let ((proj
(ignore-errors
(cond
((featurep 'projectile) (projectile-project-name))
(t (or
(project-name (project-current))
(file-name-nondirectory (string-trim-right (expand-file-name (vc-root-dir)) "/"))))))))
(concat
(if (buffer-modified-p) "" "")
(when (and proj (not (string= proj "-"))) (format " %s" proj)))))))
(setq frame-title-format
'("GNU Emacs (" "%b"
(:eval
(let ((proj (cond
((featurep 'projectile) (projectile-project-name))
(t (or
(ignore-errors (project-name (project-current)))
(ignore-errors (file-name-nondirectory (string-trim-right (expand-file-name (vc-root-dir)) "/")))
"*no-project*")))))
(concat
(if (buffer-modified-p) "" "")
(when (and proj (not (string= proj "-"))) (format " %s" proj)))))
")"))

;; Adapted from: github.com/Phundrak/dotfiles/blob/master/org/config/emacs.org
(with-eval-after-load 'hydra
Expand Down

0 comments on commit 0ea96fb

Please sign in to comment.