Add check if zsh session is running in xfce4-terminal
This commit is contained in:
@@ -87,10 +87,10 @@ if [ -f ~/.config/common_aliases ]; then
|
|||||||
. ~/.config/common_aliases
|
. ~/.config/common_aliases
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Determin Termanial Type
|
||||||
|
MYTERMINAL=$(basename "/"$(ps -o cmd -f -p $(cat /proc/$(echo $$)/stat | cut -d \ -f 4) | tail -1 | sed 's/ .*$//'))
|
||||||
|
# Attach to TMUX session if not already done and only if we're in xfce4-terminal (but not e.g. PyCharm)
|
||||||
if [ -z "$TMUX" ] && [ ${UID} != 0 ]
|
if [ -z "$TMUX" ] && [ ${UID} != 0 ] && [[ "$MYTERMINAL" == "xfce4-terminal" ]]
|
||||||
then
|
then
|
||||||
#tmux new-session -A -s main
|
#tmux new-session -A -s main
|
||||||
tmux attach || tmux new
|
tmux attach || tmux new
|
||||||
|
|||||||
Reference in New Issue
Block a user