all repos — dotfiles @ 5ed66f75d85ace2f57056727fe83d2b0a1e70043

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