all repos — dotfiles @ f3527d4fe0f19daf38cc96c9af7417b4113ddd39

linux dotfiles

bin/scripts/shiori-menu (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
#!/bin/bash

url=$(printf "" | dmenu -p URL)
tags=$(printf "" | dmenu -p tags)
archive=$(printf "yes\nno" | dmenu -p archive )

if [ $archive = "yes" ]
then
    aopt=""
elif [ $archive = "no" ]
then
    aopt="--no-archival"
fi

if [ "$url" ]
then
    if [ "$tags" ]
    then
        ssh inty "shiori add $aopt -t \"$tags\" $url"
    else
        ssh inty "shiori add $aopt $url"
    fi
fi