summaryrefslogtreecommitdiffstats
path: root/.zprofile
blob: e47e9ad0e1af270d499af744b1f5225a336182c6 (plain)
1
2
3
4
5
6
7
8
if [[ -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