]> Sergey Matveev's repositories - dotfiles.git/commitdiff
tabbed lynx
authorSergey Matveev <stargrave@stargrave.org>
Wed, 11 Nov 2020 09:38:40 +0000 (12:38 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 11 Nov 2020 09:38:40 +0000 (12:38 +0300)
bin/bin/start-lynx.sh [new file with mode: 0755]
bin/bin/start-tabbed.sh [new file with mode: 0755]
bin/bin/www [new file with mode: 0755]
bin/bin/www-ifexists [new file with mode: 0755]
bin/bin/zat
lynx/.lynx.cfg
urlview/.urlview

diff --git a/bin/bin/start-lynx.sh b/bin/bin/start-lynx.sh
new file mode 100755 (executable)
index 0000000..a07a6ab
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+winid=$1
+shift
+exec ~/bin/st -w $winid -e lynx $@
diff --git a/bin/bin/start-tabbed.sh b/bin/bin/start-tabbed.sh
new file mode 100755 (executable)
index 0000000..f7a0bf9
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+tabname=$1
+shift
+w=/tmp/tabbed-$tabname
+[ -r "$w" ] && {
+    read winid < $w
+    wmclass=`xprop -id $winid WM_CLASS 2>/dev/null`
+    echo "$wmclass" | grep -q tabbed-$tabname && {
+        echo $winid
+        exit
+    }
+}
+[ -z "$NOTABSTART" ] || exit 1
+tabbed -n tabbed-$tabname -d $@ > $w
+exec $0 $tabname $@
diff --git a/bin/bin/www b/bin/bin/www
new file mode 100755 (executable)
index 0000000..a7a6262
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+winid=`NOTABSTART=$NOTABSTART start-tabbed.sh lynx -f start-lynx.sh`
+[ $# -gt 0 ] || exit 0
+exec ~/bin/start-lynx.sh $winid $@
diff --git a/bin/bin/www-ifexists b/bin/bin/www-ifexists
new file mode 100755 (executable)
index 0000000..aa8877a
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+NOTABSTART=1 exec ~/bin/www $@
index becc82ff3e6ff55d9c29f56a938e68badcef4b82..610d2bbbd8161146c02a8a0881399df1839b0c61 100755 (executable)
@@ -1,14 +1,5 @@
 #!/bin/sh
 
-w=/tmp/tabbed-winid
-[ -r "$w" ] && {
-    read winid < $w
-    wmclass=`xprop -id $winid WM_CLASS 2>/dev/null`
-    echo "$wmclass" | grep -q tabbed && {
-        XDG_DATA_DIRS=$HOME/zathura bin.zathura -e $winid $@
-        rm -f zathura.core
-        exit
-    }
-}
-tabbed -cd > $w
-exec $0 $@
+winid=`start-tabbed.sh zathura -c`
+XDG_DATA_DIRS=$HOME/zathura bin.zathura -e $winid $@
+rm -f zathura.core
index 29ed19aabd58471cdaefe4dae4035b16ced6cfc8..7057f73f6a848a29012211a57ec52f99a3458df7 100644 (file)
@@ -11,4 +11,4 @@ NO_FROM_HEADER:TRUE
 MAKE_LINKS_FOR_ALL_IMAGES:TRUE
 ASSUME_CHARSET:utf-8
 JUMPFILE:/home/stargrave/.lynx_jumps.html
-COOKIE_REJECT_DOMAINS:wikipedia.org,en.wikipedia.org,ru.wikipedia.org,github.com,.reddit.com,www.reddit.com,www.google.com,.google.com,.duckduckgo.com
+COOKIE_REJECT_DOMAINS:wikipedia.org,en.wikipedia.org,ru.wikipedia.org,github.com,.reddit.com,www.reddit.com,www.google.com,.google.com,.duckduckgo.com,lenta.ru
index bde25e705e60098084fde5e056f91fa831082479..9c80a61207d8659f4825c2c882723e1730a4e9e0 100644 (file)
@@ -1 +1 @@
-COMMAND ~/xombrero/bin/xombrero -n %s
+COMMAND /home/stargrave/bin/www-ifexists %s &