Files
dots/config/polybar/scripts/checkupdates.sh
2025-11-24 19:46:30 +07:00

13 lines
248 B
Bash
Executable File

#!/usr/bin/env bash
updates=$(sysupdate)
if [ -z "$updates" ]; then
count=0
else
printf '%s\n' "$updates" >/tmp/bspwm-polybar-updates
count=$(wc -l "/tmp/bspwm-polybar-updates" | awk '{print $1}')
fi
echo "%{T1}%{T-} %{T2}$count %{T-}"