]> Sergey Matveev's repositories - dotfiles.git/blob - bin/bin/www
Add timeout to wait for window resized
[dotfiles.git] / bin / bin / www
1 #!/bin/sh
2
3 term() {
4     DISPLAY=:0 CMD="tmux attach-session -t www" CMDTITLE="Terminal9" $HOME/bin/dwm-term &
5 }
6
7 if tmux has-session -t www 2> /dev/null ; then
8     attached=`tmux list-sessions -F "#{session_attached}" -f "#{==:#{session_name},www}"`
9     [ "$attached" != "0" ] || {
10         term &
11         sleep 0.5
12     }
13     tmux new-window -t www "lynx $@"
14 else
15     tmux new-session -d -s www "sleep 0.5 ; lynx $@"
16     tmux set-option -t www default-command lynx
17     term &
18 fi