From 1063325b18ed6d7eaa277f720dedde4690461984 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 11 Jul 2017 17:10:07 +0200 Subject: Emacs: Simplify nix title generation --- emacs/.emacs.d/init.org | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 4839beb6..304abc46 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 -- cgit 1.4.1