diff --git a/dot_config/herbstluftwm/executable_file-browser b/dot_config/herbstluftwm/executable_file-browser index c00462c..ca46ccf 100644 --- a/dot_config/herbstluftwm/executable_file-browser +++ b/dot_config/herbstluftwm/executable_file-browser @@ -3,25 +3,16 @@ set -e last_dir_file=/run/user/1000/rofi-fb.last-dir -if (( ROFI_RETV == 0 )) + +if [[ -n "$ROFI_DATA" ]] && [[ -d "$ROFI_DATA" ]] then - # echo "first call" >&2 - rm -f /run/user/1000/rofi-fb.last-dir + cd "$ROFI_DATA" fi -if [[ -e "$last_dir_file" ]] -then - ld="$(cat "$last_dir_file")" - # echo "change to $ld" >&2 - [[ -d "$ld" ]] && cd "$ld" -fi - - - if [[ -d "$1" ]] then cd "$1" - echo "$PWD" > "$last_dir_file" + echo -e "\0data\x1f$(pwd)" elif [[ -x "$1" ]] then "$1" @@ -33,6 +24,7 @@ then exit 0 fi -echo ".." -ls -A +echo -e "\0message\x1f$(pwd)" +echo "../" +ls -A1 --file-type --group-directories-first # vim:sw=4:ts=4:et: