mirror of
https://github.com/tw93/Mole.git
synced 2026-02-16 22:14:12 +00:00
chore: auto format code
This commit is contained in:
@@ -216,9 +216,9 @@ get_cleanup_path_size_kb() {
|
|||||||
if [[ -L "$path" ]]; then
|
if [[ -L "$path" ]]; then
|
||||||
if command -v stat > /dev/null 2>&1; then
|
if command -v stat > /dev/null 2>&1; then
|
||||||
local bytes
|
local bytes
|
||||||
bytes=$(stat -f%z "$path" 2>/dev/null || echo "0")
|
bytes=$(stat -f%z "$path" 2> /dev/null || echo "0")
|
||||||
if [[ "$bytes" =~ ^[0-9]+$ && "$bytes" -gt 0 ]]; then
|
if [[ "$bytes" =~ ^[0-9]+$ && "$bytes" -gt 0 ]]; then
|
||||||
echo $(( (bytes + 1023) / 1024 ))
|
echo $(((bytes + 1023) / 1024))
|
||||||
else
|
else
|
||||||
echo 0
|
echo 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ opt_sqlite_vacuum() {
|
|||||||
page_count=$(echo "$page_info" | awk 'NR==1 {print $1}' 2> /dev/null || echo "")
|
page_count=$(echo "$page_info" | awk 'NR==1 {print $1}' 2> /dev/null || echo "")
|
||||||
freelist_count=$(echo "$page_info" | awk 'NR==2 {print $1}' 2> /dev/null || echo "")
|
freelist_count=$(echo "$page_info" | awk 'NR==2 {print $1}' 2> /dev/null || echo "")
|
||||||
if [[ "$page_count" =~ ^[0-9]+$ && "$freelist_count" =~ ^[0-9]+$ && "$page_count" -gt 0 ]]; then
|
if [[ "$page_count" =~ ^[0-9]+$ && "$freelist_count" =~ ^[0-9]+$ && "$page_count" -gt 0 ]]; then
|
||||||
if (( freelist_count * 100 < page_count * 5 )); then
|
if ((freelist_count * 100 < page_count * 5)); then
|
||||||
((skipped++))
|
((skipped++))
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
@@ -518,7 +518,7 @@ opt_bluetooth_reset() {
|
|||||||
local bt_audio_active=false
|
local bt_audio_active=false
|
||||||
|
|
||||||
# Check system audio output
|
# Check system audio output
|
||||||
if system_profiler SPBluetoothDataType 2>/dev/null | grep -q "Connected: Yes"; then
|
if system_profiler SPBluetoothDataType 2> /dev/null | grep -q "Connected: Yes"; then
|
||||||
# Check if any audio/video apps are running that might be using Bluetooth
|
# Check if any audio/video apps are running that might be using Bluetooth
|
||||||
local -a media_apps=("Music" "Spotify" "VLC" "QuickTime Player" "TV" "Podcasts")
|
local -a media_apps=("Music" "Spotify" "VLC" "QuickTime Player" "TV" "Podcasts")
|
||||||
for app in "${media_apps[@]}"; do
|
for app in "${media_apps[@]}"; do
|
||||||
|
|||||||
Reference in New Issue
Block a user