From 2dedcfda5a5c4ffeb866453c89d3b7bd86f7ae76 Mon Sep 17 00:00:00 2001
From: mg <mg@noreply.git.mgrote.net>
Date: Fri, 13 Sep 2024 19:06:40 +0200
Subject: [PATCH] revert 561a0647be108dd089dd681538928d72b7d1df15

revert tmux: check if session is interactive
---
 .bash_extra | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/.bash_extra b/.bash_extra
index f546624..ade3b19 100644
--- a/.bash_extra
+++ b/.bash_extra
@@ -12,15 +12,12 @@ source "${HOME}/dotfiles/.bash_ps1"
 # add my scripts to PATH
 PATH=$PATH:"${HOME}/dotfiles/scripts"
 
-## check interactive shell https://unix.stackexchange.com/questions/26676/how-to-check-if-a-shell-is-login-interactive-batch
-if [[ $- == *i* ]] ; then
-  ### tmux auto attach
-  # Check if the user ID is not 0 (root)
-  if [ "$EUID" -ne 0 ]; then
-    # then auto attach
-    if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then
-      tmux attach -t default || tmux new -s default
-    fi
+### tmux auto attach
+# Check if the user ID is not 0 (root)
+if [ "$EUID" -ne 0 ]; then
+  # then auto attach
+  if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then
+    tmux attach -t default || tmux new -s default
   fi
 fi