aboutsummaryrefslogtreecommitdiff
path: root/selectPath.sh
diff options
context:
space:
mode:
Diffstat (limited to 'selectPath.sh')
-rwxr-xr-xselectPath.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/selectPath.sh b/selectPath.sh
new file mode 100755
index 0000000..5de2af8
--- /dev/null
+++ b/selectPath.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Reads ~/.paths and uses dmenu to echo a path.
+
+[ -z "$1" ] && prompt="Choose a path:" || prompt="$1"
+echo "$(cat $HOME/.paths | dmenu -l $(cat $HOME/.paths | wc -l) -p "$prompt" | awk '{print $3}')"
+