summaryrefslogtreecommitdiff
path: root/bin/dmscripts/dmfm
diff options
context:
space:
mode:
Diffstat (limited to 'bin/dmscripts/dmfm')
-rwxr-xr-xbin/dmscripts/dmfm17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/dmscripts/dmfm b/bin/dmscripts/dmfm
new file mode 100755
index 0000000..34a9e2c
--- /dev/null
+++ b/bin/dmscripts/dmfm
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+file=1
+while [ "$file" ]; do
+ file=$(ls -1 --group-directories-first | dmenu -i -l 8 -g 1 -p "$(basename $(pwd)):")
+ if [ -e "$file" ]; then
+ owd=$(pwd)
+ if [ -d "$file" ]; then
+ cd "$file"
+ else [ -f "$file" ]
+ if which xdg-open &> /dev/null; then
+ exec xdg-open "$owd/$file" &
+ unset file
+ fi
+ fi
+ fi
+done