From 8800a6c2fd5b1025a0441ecaa0dd108c78f66eb7 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 18 Jul 2018 11:59:48 +0200 Subject: [PATCH] screenrc: only show hostname in hardstatus on remote systems --- shell/screenrc.in | 4 ++-- shell/setup.sh | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/shell/screenrc.in b/shell/screenrc.in index 0ac4b7c..e9f397a 100644 --- a/shell/screenrc.in +++ b/shell/screenrc.in @@ -74,8 +74,8 @@ unsetenv s # Always display the status line with open windows and the hostname. setenv s "$s%Lw" # - number and names of windows, L displays window flags setenv s "$s%=" # - right align the following text -setenv s "$s " # - space -setenv s "$s%H" # - hostname +setenv s "$s " # - space (REMOTE) +setenv s "$s%H" # - hostname (REMOTE) setenv s "$s " # - space (TEMPERATURE) setenv s "$s%2`" # - temperature (TEMPERATURE) setenv s "$s " # - space (BATTERY) diff --git a/shell/setup.sh b/shell/setup.sh index 5e6866f..394c463 100755 --- a/shell/setup.sh +++ b/shell/setup.sh @@ -184,6 +184,11 @@ if ! test -d "$temperature"; then fi apply_optional_replacement screenrc \ temperature TEMPERATURE "$temperature" +# Settings for local hosts. +if test -z "${SSH_CONNECTION:+set}"; then + echo 'screenrc: removing remote options' + grep_i -v '(REMOTE)' screenrc +fi if installed tmux; then -- 2.45.2