From 34af814d711837364e1c28952db53301c285b2da Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 3 Jul 2024 11:26:38 +0300 Subject: [PATCH] Revert "Do not remember when I used www-wrapper last time" This reverts commit 211a5d258292629acdbf4a6a94e0aad97a859789. --- bin/bin/www | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 bin/bin/www diff --git a/bin/bin/www b/bin/bin/www new file mode 100755 index 0000000..86d9102 --- /dev/null +++ b/bin/bin/www @@ -0,0 +1,20 @@ +#!/bin/sh + +[ -e /tmp/stargrave-flags/WG ] && [ -n "$1" ] && exec xom "$1" & + +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 -- 2.48.1