files: if folder name longer than 7 characters, truncate

Signed-off-by: Miles Alan <m@milesalan.com>
master
Anjandev Momi 4 years ago committed by Miles Alan
parent a245f46914
commit 0013ea3d73
  1. 6
      scripts/appscripts/sxmo_files.sh

@ -20,6 +20,12 @@ handlefiles() {
while true; do
CHOICES="$(printf %b 'Close Menu\n../\n*\n'"$(ls -1p)")"
DIR="$(basename "$(pwd)")"
TRUNCATED="$(printf %.7s "$DIR")"
if [ "$DIR" != "$TRUNCATED" ]; then
DIR="$TRUNCATED..."
fi
PICKED="$(
echo "$CHOICES" |
dmenu -fn Terminus-18 -c -p "$DIR" -l 20

Loading…
Cancel
Save