summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-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" &