diff options
Diffstat (limited to 'bin/guiscripts/dmfm')
| -rwxr-xr-x | bin/guiscripts/dmfm | 28 | 
1 files changed, 15 insertions, 13 deletions
diff --git a/bin/guiscripts/dmfm b/bin/guiscripts/dmfm index 969c111..d1dd8b8 100755 --- a/bin/guiscripts/dmfm +++ b/bin/guiscripts/dmfm @@ -1,17 +1,19 @@  #!/bin/sh -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 +while true +do +	file=$(find . -maxdepth 1 -mindepth 1 -not -name '.*' -printf '%y\t%f\n' | +		sort -k 1 -k 2 | cut -f 2- | +		commander -xcd -p "$PWD>") + +	[ "$file" ] || break +	[ ! -e "$file" ] && continue + +	if [ -d "$file" ] +	then +		cd "$file" || continue +	else +		setsid xdg-open "$PWD/$file" &  	fi +  done  | 
