From 17ed5fcbe6af32fdb86a7272f9e34de532b3db9c Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Mon, 31 Aug 2015 13:18:15 +0100 Subject: Save various changes --- bin/xopen | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 bin/xopen (limited to 'bin/xopen') 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" & -- cgit v1.2.3