X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;ds=sidebyside;f=bin%2Fbin%2Fwww;h=d58285dc32ca65ff3a32c88e232e60bcd838cff1;hb=48338303d760027e62bab963fa11a940bc0d97eb;hp=a7a62626105592a244d0186bb7c25f8ea7143d3a;hpb=2127a8b1d91181a70de2ffca9720574b757dab0c;p=dotfiles.git diff --git a/bin/bin/www b/bin/bin/www index a7a6262..d58285d 100755 --- a/bin/bin/www +++ b/bin/bin/www @@ -1,5 +1,22 @@ #!/bin/sh -winid=`NOTABSTART=$NOTABSTART start-tabbed.sh lynx -f start-lynx.sh` -[ $# -gt 0 ] || exit 0 -exec ~/bin/start-lynx.sh $winid $@ +[ -e /tmp/stargrave-flags/WG ] && [ -n "$1" ] && { + exec $HOME/local/bin/xombrero -n "$1" 2>/dev/null +} + +term() { + DISPLAY=:0 CMD="tmux attach-session -t www" CMDTITLE="Terminal9" $HOME/bin/dwm-term & +} + +if tmux has-session -t www 2> /dev/null ; then + attached=`tmux list-sessions -F "#{session_attached}" -f "#{==:#{session_name},www}"` + [ "$attached" != "0" ] || { + term & + sleep 0.5 + } + tmux new-window -t www "lynx $@" +else + tmux new-session -d -s www "sleep 0.5 ; lynx $@" + tmux set-option -t www default-command lynx + term & +fi