From cf4a4aaecb47ba7ef2fc5ce73314f6557e04ea8e Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Fri, 6 May 2022 10:03:51 +0300 Subject: [PATCH] Add title to existing screen --- bashrc.d/ZZZ_always_screen | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bashrc.d/ZZZ_always_screen b/bashrc.d/ZZZ_always_screen index 6bcea49..5748c6c 100644 --- a/bashrc.d/ZZZ_always_screen +++ b/bashrc.d/ZZZ_always_screen @@ -4,6 +4,11 @@ if [ -n "$(which screen)" ]; then if [ -n "${STY}" ]; then echo "This is screen session '${STY//[0-9]*\./}'" + if [ -n "$(which xtitle)" ]; then + xtitle "${session_name}" + else + echo "xtitle is not installed so I can't update the title of the X window with the session name. Install it and the experience will be better)" + fi else echo "This is not a screen session, let's create one. Name of the session?" read -r session_name