Added script to open zathura in tabbed.

viewmd now also uses said script.
This commit is contained in:
sheldonmlee 2021-11-10 02:38:56 +08:00
parent a1f1d5f293
commit ad3e3f94af

View File

@ -81,9 +81,9 @@ viewmd()
pdfname=$(basename $1 .md).pdf pdfname=$(basename $1 .md).pdf
echo $pdfname echo $pdfname
if [ -f $pdfname ]; then if [ -f $pdfname ]; then
zathura $pdfname & disown tzathura $pdfname
else else
pandoc -t pdf $1 | zathura - & disown pandoc -t pdf $1 | tzathura -
fi fi
} }
@ -95,4 +95,14 @@ makemd()
pandoc -t pdf $1 -o $(basename $1 .md).pdf 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 $(</tmp/tabbed.xid) & disown
}