diff options
author | Alan Pearce | 2017-07-11 17:10:07 +0200 |
---|---|---|
committer | Alan Pearce | 2017-07-11 17:10:07 +0200 |
commit | 1063325b18ed6d7eaa277f720dedde4690461984 (patch) | |
tree | 5cf91d464d325bec89dc968202f0c9bc617f2080 | |
parent | 9bc57e8f0124b1a0e553aff2384beb70f35113c1 (diff) | |
download | dotfiles-1063325b18ed6d7eaa277f720dedde4690461984.tar.lz dotfiles-1063325b18ed6d7eaa277f720dedde4690461984.tar.zst dotfiles-1063325b18ed6d7eaa277f720dedde4690461984.zip |
Emacs: Simplify nix title generation
-rw-r--r-- | emacs/.emacs.d/init.org | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 4839beb..304abc4 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -295,23 +295,23 @@ correct, at least for Liberation Mono. (require 'f) -(if (f-ancestor-of? "/nix/store" invocation-directory) - (setq frame-title-format (list "Emacs (Nix Generation " - (cadr - (split-string (f-base - (car - (last (split-string - (s-chomp (shell-command-to-string (concat "nix-store -q --roots " invocation-directory))) - "\n")))) - "-")) - " " - (s-left 6 (nth 3 (f-split invocation-directory))) - "..." - (s-right 6 (car (split-string (nth 3 (f-split invocation-directory)) "-"))) - ")" - " — %f" - '(dired-directory dired-directory))) - (setq frame-title-format '("Emacs — %f" (dired-directory dired-directory)))) +(setq frame-title-format (list "Emacs" + (if (f-ancestor-of? "/nix/store" invocation-directory) + (list " (Nix Generation " + (cadr + (split-string (f-base + (car + (last (split-string + (s-chomp (shell-command-to-string (concat "nix-store -q --roots " invocation-directory))) + "\n")))) + "-")) + " " + (s-left 6 (nth 3 (f-split invocation-directory))) + "..." + (s-right 6 (car (split-string (nth 3 (f-split invocation-directory)) "-"))) + ")")) + '(buffer-file-name " — %f") + '(dired-directory (" — " dired-directory)))) #+END_SRC ** Chrome |