summaryrefslogtreecommitdiffstats
path: root/.zprofile
blob: 77380125e775c7a6248d6b12a08e2795c7ef1bea (plain)
1
2
3
4
5
6
7
8
if tty -s && [[ -z $DISPLAY ]] && type screen &>/dev/null && [[ -e ~/.screenrc-2 ]]; then
	screenname=$(screen -list | grep "screen-sh-2")
	if [ ! "$screenname" ]; then
		exec screen -S "screen-sh-2" -c ~/.screenrc-2
	elif echo $screenname | grep -q "Detached"; then
	  exec screen -r screen-sh-2
	fi
fi