summaryrefslogtreecommitdiff
path: root/bin/xopen
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2015-08-31 13:18:15 +0100
committerUrbain Vaes <urbain@vaes.uk>2015-08-31 13:18:15 +0100
commit17ed5fcbe6af32fdb86a7272f9e34de532b3db9c (patch)
tree9ef17cdd53fc930732459e03edcdb1bcfd133ad1 /bin/xopen
parente7f2cb91510795f1275abed4e5e878ee9c209fc3 (diff)
Save various changes
Diffstat (limited to 'bin/xopen')
-rwxr-xr-xbin/xopen9
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" &