From ad3e3f94afedf193b80c9cf903723c1965132483 Mon Sep 17 00:00:00 2001 From: sheldonmlee Date: Wed, 10 Nov 2021 02:38:56 +0800 Subject: [PATCH] Added script to open zathura in tabbed. viewmd now also uses said script. --- .custom_bash_scripts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.custom_bash_scripts b/.custom_bash_scripts index ab7f909..5df1461 100644 --- a/.custom_bash_scripts +++ b/.custom_bash_scripts @@ -81,9 +81,9 @@ viewmd() pdfname=$(basename $1 .md).pdf echo $pdfname if [ -f $pdfname ]; then - zathura $pdfname & disown + tzathura $pdfname else - pandoc -t pdf $1 | zathura - & disown + pandoc -t pdf $1 | tzathura - fi } @@ -95,4 +95,14 @@ makemd() pandoc -t pdf $1 -o $(basename $1 .md).pdf } +# view zathrua in tabbed +tzathura() +{ + # rm tabbbed.xid if not running + ! pgrep -f tabbed && rm /tmp/tabbed.xid + if [ ! -f /tmp/tabbed.xid ]; then + tabbed -c -d > /tmp/tabbed.xid + fi + zathura "$@" -e $(