summaryrefslogtreecommitdiffstats
path: root/.zprofile
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-02-08 19:02:32 +0100
committerFlorian Pritz <bluewind@xinu.at>2012-02-08 19:02:32 +0100
commit0180ffdb0b7bd031f4fdcb9d12ef3e863421129c (patch)
treef1b62d0ba0e46e4712df82186a26ce98d938de60 /.zprofile
parentba52a716026f5ce8cd8a4ec4dbeeb099b2a51b7d (diff)
downloaddotfiles-0180ffdb0b7bd031f4fdcb9d12ef3e863421129c.tar.gz
dotfiles-0180ffdb0b7bd031f4fdcb9d12ef3e863421129c.tar.xz
zprofile: only run screen if it is installed
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to '.zprofile')
-rw-r--r--.zprofile13
1 files changed, 7 insertions, 6 deletions
diff --git a/.zprofile b/.zprofile
index cc1db01..fa8160b 100644
--- a/.zprofile
+++ b/.zprofile
@@ -1,7 +1,8 @@
-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
+if 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
-