mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 13:16:47 +00:00
chore: auto format code
This commit is contained in:
@@ -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}"
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user