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