diff options
| author | 2026-05-14 10:58:37 +0100 | |
|---|---|---|
| committer | 2026-05-14 10:58:37 +0100 | |
| commit | 726005786ab398e89673bf8c141e50645f676c57 (patch) | |
| tree | c6157391bfb7b41e4db1309b78b17f680f0c50c3 /dot_config/waybar | |
| parent | db4c6bdcd2af6aa2b95f587974f34c0246f62cb8 (diff) | |
| download | dotfiles-726005786ab398e89673bf8c141e50645f676c57.tar.gz dotfiles-726005786ab398e89673bf8c141e50645f676c57.tar.bz2 dotfiles-726005786ab398e89673bf8c141e50645f676c57.zip | |
style: apply shfmt/prettier/just fmt drift
Pure formatter output from shfmt (2-space indent, '|' line breaks),
prettier (KEYBINDS.md), and 'just fmt' (justfile blank line).
No behavior change.
Diffstat (limited to 'dot_config/waybar')
| -rwxr-xr-x | dot_config/waybar/executable_update-status.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/dot_config/waybar/executable_update-status.sh b/dot_config/waybar/executable_update-status.sh index 471116f..2317256 100755 --- a/dot_config/waybar/executable_update-status.sh +++ b/dot_config/waybar/executable_update-status.sh @@ -26,16 +26,16 @@ emit_empty() { [ -r "$LOG" ] || emit_empty # Pacman log lines look like: [2026-05-07T08:30:00+0000] [PACMAN] starting full system upgrade -last=$(grep -F '[PACMAN] starting full system upgrade' "$LOG" \ - | tail -n1 \ - | sed -n 's/^\[\([^]]*\)\].*/\1/p') +last=$(grep -F '[PACMAN] starting full system upgrade' "$LOG" | + tail -n1 | + sed -n 's/^\[\([^]]*\)\].*/\1/p') [ -n "$last" ] || emit_empty last_epoch=$(date -d "$last" +%s 2>/dev/null) || emit_empty now=$(date +%s) -elapsed=$(( now - last_epoch )) -hours=$(( elapsed / 3600 )) -days=$(( hours / 24 )) +elapsed=$((now - last_epoch)) +hours=$((elapsed / 3600)) +days=$((hours / 24)) [ "$hours" -lt 24 ] && emit_empty @@ -65,12 +65,12 @@ last_notified=0 if [ -f "$STATE" ]; then last_notified=$(cat "$STATE" 2>/dev/null || printf 0) case "$last_notified" in - ''|*[!0-9]*) last_notified=0 ;; + '' | *[!0-9]*) last_notified=0 ;; esac fi -if [ $(( now - last_notified )) -ge 86400 ] \ - && command -v notify-send >/dev/null 2>&1; then +if [ $((now - last_notified)) -ge 86400 ] && + command -v notify-send >/dev/null 2>&1; then notify-send \ --app-name=system-update \ --urgency="$urgency" \ |
