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