diff options
author | Urbain Vaes <urbain@vaes.uk> | 2015-08-31 13:18:15 +0100 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2015-08-31 13:18:15 +0100 |
commit | 17ed5fcbe6af32fdb86a7272f9e34de532b3db9c (patch) | |
tree | 9ef17cdd53fc930732459e03edcdb1bcfd133ad1 /bin/xopen | |
parent | e7f2cb91510795f1275abed4e5e878ee9c209fc3 (diff) |
Save various changes
Diffstat (limited to 'bin/xopen')
-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" & |