commit 5f2d3a3953fec19ee34bd47e98df69e0a3b9fb41 parent cfddc7cc625aa9db97aebbac0200c4710c0b87f6 Author: Kévin Le Gouguec <kevin.legouguec@gmail.com> Date: Thu, 6 Dec 2018 19:22:36 +0100 Tweak Emacs frames title This is somewhat more informative for me. Diffstat:
| M | .emacs | | | 11 | +++++++++++ |
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/.emacs b/.emacs @@ -277,5 +277,16 @@ ;; Font stuff (🤷 🤦) (set-fontset-font "fontset-default" nil (font-spec :name "Symbola") nil 'append) +(defun my/project-name () + (when-let* ((project (project-current)) + (root (car (project-roots project)))) + (when (not (file-equal-p root "~")) + (file-name-nondirectory (string-trim-right root "/"))))) + +(setq frame-title-format + '(:eval + (let ((project (my/project-name))) + (concat (when project (format "[%s] " project)) "%b")))) + ;; TODO: fringe fun: hideshowvis, git gutter… ;; TODO: decruftify mode-line (e.g. remove superflous parens)