From 5b73e4ffad49c0fd19940a82a2aca6abc63497ed Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 10 Dec 2025 03:53:17 +0000 Subject: [PATCH] chore: auto format code --- bin/optimize.sh | 5 ++++- cmd/status/view.go | 6 +++--- lib/core/base.sh | 2 +- lib/ui/app_selector.sh | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/bin/optimize.sh b/bin/optimize.sh index e4e21b8..2d517e3 100755 --- a/bin/optimize.sh +++ b/bin/optimize.sh @@ -402,7 +402,10 @@ main() { if [[ ${#CURRENT_WHITELIST_PATTERNS[@]} -gt 0 ]]; then local count=${#CURRENT_WHITELIST_PATTERNS[@]} if [[ $count -le 3 ]]; then - local patterns_list=$(IFS=', '; echo "${CURRENT_WHITELIST_PATTERNS[*]}") + local patterns_list=$( + IFS=', ' + echo "${CURRENT_WHITELIST_PATTERNS[*]}" + ) echo -e "${ICON_ADMIN} Active Whitelist: ${patterns_list}" else echo -e "${ICON_ADMIN} Active Whitelist: ${GRAY}${count} items${NC}" diff --git a/cmd/status/view.go b/cmd/status/view.go index f3733ba..898b7b9 100644 --- a/cmd/status/view.go +++ b/cmd/status/view.go @@ -109,7 +109,7 @@ func getMoleFrame(animFrame int, termWidth int) string { var body []string var bodyIdx int isChristmas := isChristmasSeason() - + if isChristmas { bodyIdx = animFrame % len(moleBodyWithHat) body = moleBodyWithHat[bodyIdx] @@ -138,7 +138,7 @@ func getMoleFrame(animFrame int, termWidth int) string { padding := strings.Repeat(" ", pos) var lines []string - + if isChristmas { // Render with red hat on first 3 lines for i, line := range body { @@ -153,7 +153,7 @@ func getMoleFrame(animFrame int, termWidth int) string { lines = append(lines, padding+line) } } - + return strings.Join(lines, "\n") } diff --git a/lib/core/base.sh b/lib/core/base.sh index db0e219..895e926 100644 --- a/lib/core/base.sh +++ b/lib/core/base.sh @@ -60,7 +60,7 @@ is_christmas_season() { local month day month=$(date +%-m) day=$(date +%-d) - + # December 10 to December 31 if [[ $month -eq 12 && $day -ge 10 && $day -le 31 ]]; then return 0 diff --git a/lib/ui/app_selector.sh b/lib/ui/app_selector.sh index 96348d9..c8e93c0 100755 --- a/lib/ui/app_selector.sh +++ b/lib/ui/app_selector.sh @@ -16,10 +16,10 @@ format_app_display() { [[ "$size" != "0" && "$size" != "" && "$size" != "Unknown" ]] && size_str="$size" # Calculate available width for app name based on terminal width - local terminal_width=$(tput cols 2>/dev/null || echo 80) + local terminal_width=$(tput cols 2> /dev/null || echo 80) local fixed_width=28 local available_width=$((terminal_width - fixed_width)) - + # Set reasonable bounds for name width: 24-35 chars [[ $available_width -lt 24 ]] && available_width=24 [[ $available_width -gt 35 ]] && available_width=35