summaryrefslogtreecommitdiffstats
path: root/.zprofile
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-03-31 14:21:20 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-03-31 14:26:09 +0200
commit4479ef76d1e67c03db9bc9ab1d2eb4a0b49a6f8f (patch)
tree3ec803fc518be27e84c8d9cfe80cfc76a656a941 /.zprofile
parent96741c05fb309655135a455036dd09018a22f1d1 (diff)
downloaddotfiles-4479ef76d1e67c03db9bc9ab1d2eb4a0b49a6f8f.tar.gz
dotfiles-4479ef76d1e67c03db9bc9ab1d2eb4a0b49a6f8f.tar.xz
zprofile: Only start screen if we have a terminal
screen isn't being started in detached mode so it complains if there is no terminal. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to '.zprofile')
-rw-r--r--.zprofile2
1 files changed, 1 insertions, 1 deletions
diff --git a/.zprofile b/.zprofile
index e47e9ad..7738012 100644
--- a/.zprofile
+++ b/.zprofile
@@ -1,4 +1,4 @@
-if [[ -z $DISPLAY ]] && type screen &>/dev/null && [[ -e ~/.screenrc-2 ]]; then
+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