From 781bf3836a8fea4b73672809eb791c0ea0d038b8 Mon Sep 17 00:00:00 2001 Message-Id: <781bf3836a8fea4b73672809eb791c0ea0d038b8.1717821594.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sun, 26 Apr 2020 19:19:11 +0100 Subject: [PATCH] dot/emacs: Put the unqualified hostname in the frame title. Organization: Straylight/Edgeware From: Mark Wooding --- dot/emacs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dot/emacs b/dot/emacs index 4ece425..d6a1f4c 100644 --- a/dot/emacs +++ b/dot/emacs @@ -617,7 +617,12 @@ ;; Other frame fiddling. -(setq frame-title-format '("Emacs " user-login-name "@" system-name " – %b")) +(defvar mdw-hostname + (if (string-match "\\." system-name) + (substring system-name 0 (match-beginning 0)) + system-name)) +(setq frame-title-format + '("Emacs " user-login-name "@" mdw-hostname " – %b")) ;; Global keymap changes. -- [mdw]