#!/bin/bash # Reports whether mnotifd's notification history currently holds any cached # entries (persists across dismissed/expired cards — see mnotifd/history.py's # HISTORY_FILE), not just whatever's live on screen right now. # # Prints "true" while at least one entry is cached, else "false". HISTORY_FILE="${XDG_CACHE_HOME:-$HOME/.cache}/mnotifd/history.json" if [[ -s "$HISTORY_FILE" ]] && jq -e 'length > 0' "$HISTORY_FILE" >/dev/null 2>&1; then echo "true" else echo "false" fi