Code: Select all
exec x-terminal-emulator -e bash -c "tmux -q has-session && exec tmux attach-session -d || exec tmux new-session 'ranger /media' \; split-window -h ranger \; split-window -v \;"
Also: you may change "ranger" / "ranger /media" with your apps name like rTorrent, newsbeuter, mutt etc...
I find the above command useful, because, keeps sessions open in tmux even if i close the console window or if the tmux is running on desktop, it open back where i left it.