jgbrowser show hidden files by default
parent
fca9b979f8
commit
f0bdd9edc8
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Daniel Napora 2020 <napcok@gmail.com>
|
# Daniel Napora 2020 <napcok@gmail.com>
|
||||||
|
. $HOME/.config/mabox/mabox.conf
|
||||||
# Read a directory to an array and sort it directories first.
|
# Read a directory to an array and sort it directories first.
|
||||||
case $LANG in
|
case $LANG in
|
||||||
pl*)
|
pl*)
|
||||||
|
@ -30,6 +30,7 @@ esac
|
||||||
# If '$DIRECTORY' is '/', unset it to avoid '//'.
|
# If '$DIRECTORY' is '/', unset it to avoid '//'.
|
||||||
[[ $DIRECTORY == / ]] && DIRECTORY=
|
[[ $DIRECTORY == / ]] && DIRECTORY=
|
||||||
|
|
||||||
|
if [ $jgbrowser_show_hidden == false ];then
|
||||||
for item in "$DIRECTORY"/*; do
|
for item in "$DIRECTORY"/*; do
|
||||||
if [[ -d $item ]]; then
|
if [[ -d $item ]]; then
|
||||||
dirs+=("${item##*/},^pipe(jgbrowser \"$DIRECTORY/${item##*/}\")")
|
dirs+=("${item##*/},^pipe(jgbrowser \"$DIRECTORY/${item##*/}\")")
|
||||||
|
@ -39,7 +40,18 @@ esac
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
else
|
||||||
|
for item in "$DIRECTORY"/* "$DIRECTORY"/.[^.]*; do
|
||||||
|
if [[ -d $item ]]; then
|
||||||
|
dirs+=("${item##*/},^pipe(jgbrowser \"$DIRECTORY/${item##*/}\")")
|
||||||
|
else
|
||||||
|
if [[ -f $item ]]; then
|
||||||
|
files+=("${item##*/},xdg-open \"$DIRECTORY/${item##*/}\"")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
printf "%b\n" "^sep(<small><i>${DIRECTORY:-/}</i></small>)"
|
printf "%b\n" "^sep(<small><i>${DIRECTORY:-/}</i></small>)"
|
||||||
printf "%b\n" " $OPENDIR,${JGMENU_RESOURCE_OPENER} \"${DIRECTORY:-/}\""
|
printf "%b\n" " $OPENDIR,${JGMENU_RESOURCE_OPENER} \"${DIRECTORY:-/}\""
|
||||||
printf "%b\n" " $OPENTERM,exo-open --launch TerminalEmulator --working-directory=\"${DIRECTORY:-/}\""
|
printf "%b\n" " $OPENTERM,exo-open --launch TerminalEmulator --working-directory=\"${DIRECTORY:-/}\""
|
||||||
|
|
Loading…
Reference in New Issue