So, I'm using Xonsh Shell and tmux, where on ~/.xonshrc
, the contents are this:
# XONSH WEBCONFIG START
$XONSH_COLOR_STYLE = 'rainbow_dash'
# XONSH WEBCONFIG END
$XONSH_SHOW_TRACEBACK = True
$all_proxy="socks5://localhost:9050"
$UPDATE_OS_ENVIRON = True
tmux
xdotool key ctrl+b c
xdotool key ctrl+b 0
xdotool type "weechat"
Is there a way I can make tmux NOT start any more instances of itself?
I tried to unset TMUX enviroment variable, hoping that this would not happen anymore, but it just created more instances this way.
I guess this is how the infinite loop happens —
xonsh
xonsh
loads .xonshrc
.xonshrc
starts tmux
or create new tmux
windowstmux
windows, tmux
starts new xonsh
You can try like this:
if not !(tmux ls):
tmux new -d
tmux new-window
tmux send -t :0 weechat enter
tmux attach -t :0