aboutsummaryrefslogtreecommitdiff
path: root/raspberry/.zlogin
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2021-09-21 10:56:14 +0300
committereug-vs <eugene@eug-vs.xyz>2021-09-21 10:58:50 +0300
commit90b9522b15a692532d9b3f28acc417670144e3fa (patch)
tree546cccd97a5ee9c6069e09f616838be460b3bfed /raspberry/.zlogin
parent19498a2dd5aa8edb95c216482b63ed947a903bcc (diff)
downloaddotfiles-90b9522b15a692532d9b3f28acc417670144e3fa.tar.gz
feat(rpi): separate display and master sessions
Diffstat (limited to 'raspberry/.zlogin')
-rw-r--r--raspberry/.zlogin9
1 files changed, 8 insertions, 1 deletions
diff --git a/raspberry/.zlogin b/raspberry/.zlogin
index 227f78e..729b420 100644
--- a/raspberry/.zlogin
+++ b/raspberry/.zlogin
@@ -1 +1,8 @@
-[ -z "$TMUX" ] && tmux attach -t default || tmuxinator start default
+if [ -n "$SSH_CONNECTION" ]; then
+ # If we are logged in via SSH, automatically attach to master session
+ [ -z "$TMUX" ] && (tmux attach -t master || tmux new -s master)
+else
+ # If we are logged in directly (not via SSH)
+ # create the session which will be displayed on TV
+ tmuxinator start display
+fi