aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2016-12-17 13:35:39 +0100
committerAdrian Kummerlaender2016-12-17 13:35:39 +0100
commitdc372b427ede06e2f1aa5954116cb46d81a10741 (patch)
tree735b27d6c729be2d775e751e8b001b016d2e5b68
parente8a146b6aac3e3c80bdbaefeb340b1d4a2a83c2c (diff)
downloaddotfiles-dc372b427ede06e2f1aa5954116cb46d81a10741.tar
dotfiles-dc372b427ede06e2f1aa5954116cb46d81a10741.tar.gz
dotfiles-dc372b427ede06e2f1aa5954116cb46d81a10741.tar.bz2
dotfiles-dc372b427ede06e2f1aa5954116cb46d81a10741.tar.lz
dotfiles-dc372b427ede06e2f1aa5954116cb46d81a10741.tar.xz
dotfiles-dc372b427ede06e2f1aa5954116cb46d81a10741.tar.zst
dotfiles-dc372b427ede06e2f1aa5954116cb46d81a10741.zip
Auto-(re)attach screen for remote hosts
-rw-r--r--bash/.bashrc8
1 files changed, 8 insertions, 0 deletions
diff --git a/bash/.bashrc b/bash/.bashrc
index eb33c7a..50d8206 100644
--- a/bash/.bashrc
+++ b/bash/.bashrc
@@ -1,6 +1,14 @@
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
+host=`hostname`
+
+if [ $host = "automatix" ] || [ $host = "asterix" ]; then
+ if [ -z "$STY" ]; then
+ exec screen -R
+ fi
+fi
+
if [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]; then
exec startx
fi