]> Sergey Matveev's repositories - dotfiles.git/blobdiff - bin/bin/www
Huge tmux-fzf simplification with files quoting
[dotfiles.git] / bin / bin / www
index e7beed973f3a2fe416f2b9f0c66d14b40410f946..d58285dc32ca65ff3a32c88e232e60bcd838cff1 100755 (executable)
@@ -1,15 +1,22 @@
 #!/bin/sh
 
+[ -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
-    tmux new-window -t www "lynx $@"
     attached=`tmux list-sessions -F "#{session_attached}" -f "#{==:#{session_name},www}"`
-    [ "$attached" != "0" ] || term &
+    [ "$attached" != "0" ] || {
+        term &
+        sleep 0.5
+    }
+    tmux new-window -t www "lynx $@"
 else
-    tmux new-session -d -s www "lynx $@"
+    tmux new-session -d -s www "sleep 0.5 ; lynx $@"
     tmux set-option -t www default-command lynx
     term &
 fi