summaryrefslogtreecommitdiff
path: root/bin/xopen
blob: a133a4772c1e2727ff59a3f4061e34a55f9784ea (plain)
1
2
3
4
5
6
7
8
9
#!/usr/bin/bash
cd ~
PDF=$(locate "$HOME/*.pdf")
DJVU=$(locate "$HOME/*.djvu")
RESULTS="$PDF
$DJVU"
TARGET=$(echo "${RESULTS//"$HOME/"/}" | dmenu -i -p "Open File:" | tr -d '[[:space:]]')
[[ -n $TARGET ]] || exit
xdg-open "$TARGET" &