From 1dc248a36734b5f40d07f046945d8c3e5bdb0660 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 15 Nov 2020 17:58:08 +0300 Subject: [PATCH] tmuxed lynx is simpler and convenient --- bin/bin/www | 10 +++++++--- bin/bin/www-ifexists | 3 --- urlview/.urlview | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) delete mode 100755 bin/bin/www-ifexists diff --git a/bin/bin/www b/bin/bin/www index a7a6262..b92ce8a 100755 --- a/bin/bin/www +++ b/bin/bin/www @@ -1,5 +1,9 @@ #!/bin/sh -winid=`NOTABSTART=$NOTABSTART start-tabbed.sh lynx -f start-lynx.sh` -[ $# -gt 0 ] || exit 0 -exec ~/bin/start-lynx.sh $winid $@ +if tmux has-session -t www 2> /dev/null ; then + tmux new-window -t www "lynx $@" +else + tmux new-session -d -s www "lynx $@" + tmux set-option -t www default-command lynx + DISPLAY=:0 CMD="tmux attach-session -t www" CMDTITLE="Terminal9" $HOME/bin/dwm-term & +fi diff --git a/bin/bin/www-ifexists b/bin/bin/www-ifexists deleted file mode 100755 index aa8877a..0000000 --- a/bin/bin/www-ifexists +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -NOTABSTART=1 exec ~/bin/www $@ diff --git a/urlview/.urlview b/urlview/.urlview index 9c80a61..511b181 100644 --- a/urlview/.urlview +++ b/urlview/.urlview @@ -1 +1 @@ -COMMAND /home/stargrave/bin/www-ifexists %s & +COMMAND /home/stargrave/bin/www %s & -- 2.44.0