fix: checkupdates script for fastfetch causing delays; chore: removed bspwm and picom since I haven't been using or maintaining them
25 lines
610 B
Bash
Executable File
25 lines
610 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Always read from cache and return immediately
|
|
count=$(cat /tmp/checkupdates 2>/dev/null)
|
|
# nohup checkupdates > /tmp/checkupdates & disown
|
|
# $(checkupdates | wc -l > /tmp/checkupdates) & disown
|
|
|
|
if [[ $? -ne 0 ]] || [[ -z "$count" ]]; then
|
|
status="Unknown"
|
|
else
|
|
if [[ $count == "Unknown" ]]; then
|
|
status="Unknown"
|
|
elif [[ $count -eq 0 ]]; then
|
|
status="Up to date"
|
|
elif [[ $count -eq 1 ]]; then
|
|
status="$count update"
|
|
else
|
|
status="$count updates"
|
|
fi
|
|
fi
|
|
|
|
echo "$status"
|
|
|
|
exec "$HOME/.config/fastfetch/scripts/fetch_update_count.sh" & disown
|