Hi, thanks to the help in here, and on irc, I was able to write this simple script:
======================================== #!/bin/bash if tmux has -t test >/dev/null 2>&1 then exec tmux attach -t test fi tmux new-session -s test "exec tail -f /var/log/syslog/$( date '+%Y-%m-%d' )/system/kern.log" \; detach tmux split "exec tail -f /var/log/syslog/$( date '+%Y-%m-%d' )/system/authpriv.log" tmux split 'exec mc' tmux resize-pane -U -t 0 100 tmux resize-pane -U -t 1 100 tmux resize-pane -D -t 0 8 tmux resize-pane -D -t 1 8 tmux attach ======================================== The idea is that when it's being run, it checks if there is session "test", and it yes - attaches to it. if no - creates new session named test, splits window into 3 panes, set the 2 top panes to be 10 lines in height, and makes then all run what is needed. above script works for me, but I'm wondering if it could be done any better/simpler/easier. Best regards, depesz -- Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.com/ jid/gtalk: dep...@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007 ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users