# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$HOME/bin:$PATH:$HOME/.local/bin alias autossh='autossh -4 -M 50800' export PATH ( while sleep 15; do echo -ne '\0'; done ) & F=$(mktemp) if test "$TMUX"; then :; else CHX="$(tmux ls 2> /dev/null | tr \ _ | awk -F ':_1_windows' '{print $1 , ">"}')" echo :$CHX: dialog --menu "視窗終端" 20 50 10 新 \> $CHX 或無 \> 2> $F REP=$(cat $F) test "$REP" = 新 && read -p 新 REP && test "$REP" && exec tmux new -s $(tr \ _ <<< "$REP") test "$REP" = 或無 && exec tmux new -s "$(date +%a%Hh%M)-$$" test "$REP" && exec tmux a -t "$REP" test "$REP" && exec tmux new -s "$REP" echo "不 TMUX" fi