vitorpy's Dotfiles
1#!/bin/bash
2
3# Check for available DNF updates
4updates=$(dnf check-update 2>/dev/null | grep -v gstreamer | grep -E '^[a-zA-Z]' | wc -l)
5
6if [ "$updates" -gt 0 ]; then
7 echo "{\"text\":\"\\uf02d $updates\", \"tooltip\":\"$updates updates available\", \"class\":\"updates-available\"}"
8else
9 echo "{\"text\":\"\", \"tooltip\":\"System up to date\", \"class\":\"up-to-date\"}"
10fi