diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/xopen | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/xopen b/bin/xopen new file mode 100755 index 0000000..a133a47 --- /dev/null +++ b/bin/xopen @@ -0,0 +1,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" & |