Nicholas Marriott <nicholas.marri...@gmail.com> writes: > If you do without the sleeps and it goes wrong, how > many tmux servers do you end up with? (run "ps > -eopid,ppid,comm" and look for tmux with a ppid of > 1).
Using this insight, this will do unless you guys have better suggestions: tmux-two-panes-50-50 () { tmux new-session\; split-window -v\; select-pane -U } wait-for-tmux () { while [[ `ps -e -o ppid,comm | grep '1 tmux' | wc -l` != 1 ]] ; do sleep 1 done } case $TTY in (/dev/tty1) emacs ;; (/dev/tty2) tmux-two-panes-50-50 ;; (/dev/tty3) wait-for-tmux; tmux-two-panes-50-50 ;; (/dev/tty4) wait-for-tmux; tmux new-session\; split-window -v\; resize-pane -D 10 ;; (/dev/tty5) wait-for-tmux; start_X_if_not_running; irssi ;; esac -- underground experts united: http://user.it.uu.se/~embe8573 ------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users