X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=zsh%2Frc;h=f936b91ad2144408044479d5b12334a355a4faff;hb=54cf2e863c8c5bcb0746a5cf9d0ef057ca8695c3;hp=7c59aecf518a4270a7ca51e251b3b7fffa792b83;hpb=c94d8d1c45563ec9a7170e4ed491f52f4ab1904e;p=config%2Fdotfiles.git diff --git a/zsh/rc b/zsh/rc index 7c59aec..f936b91 100644 --- a/zsh/rc +++ b/zsh/rc @@ -135,7 +135,7 @@ fi # It works with screen and xterm. If screen is running in X11 (DISPLAY is set) # and stumpwm is used (it's tested if stumpish is available) then the window # title is also set in stumpwm using stumpish. -if [[ $TERM == screen || $TERM == xterm* ]]; then +if [[ $TERM == screen* || $TERM == xterm* ]]; then # Set to a non empty value to reset the window name in the next precmd() # call. window_reset=yes @@ -197,7 +197,7 @@ if [[ $TERM == screen || $TERM == xterm* ]]; then # Sets the window title. Works with screen and xterm. window_title() { - if [[ $TERM == screen ]]; then + if [[ $TERM == screen* ]]; then print -n "\ek$1\e\\" # Update window name in stumpwm if running screen in X11 and when @@ -368,7 +368,10 @@ exec 2>>(while read line; do # RUN COMMANDS # If not already in screen reattach to a running session or create a new one. -if [[ $TERM != 'screen' && $TERM != 'dumb' ]]; then +# +# screen* is necessary as `screen` uses screen.linux for example for a linux +# console which would otherwise cause an infinite loop. +if [[ $TERM != screen* && $TERM != 'dumb' ]]; then # Create a new session if none is running. if [[ $(screen -list | grep "Detached" | wc -l) == 0 ]]; then screen