aboutsummaryrefslogtreecommitdiff
path: root/rofi/rofi_locate.sh
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2017-02-25 17:16:58 +0100
committerSébastien Dailly <sebastien@chimrod.com>2017-02-25 17:16:58 +0100
commit0c371663f5bb5ea6f3e12318e9321bb0815e24a5 (patch)
treeb3ee3e4f743a0543985ba329455449f8a602f76c /rofi/rofi_locate.sh
First commit
Diffstat (limited to 'rofi/rofi_locate.sh')
-rwxr-xr-xrofi/rofi_locate.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/rofi/rofi_locate.sh b/rofi/rofi_locate.sh
new file mode 100755
index 0000000..1dc4bb9
--- /dev/null
+++ b/rofi/rofi_locate.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ -z $1 ]; then
+ echo ""
+else
+ if [ -e "$1" ]; then
+ xdg-open "$1"
+ else
+ echo ""
+ locate --ignore-case -A ~ $* | grep -v "/\."
+ fi
+fi
+