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