#!/usr/bin/env bash # Latest mako notification for the hyprlock screen, Pango-escaped, e.g. # "Battery test: Battery at 18%". Prints nothing when there are no # notifications, so the label renders empty. set -u makoctl list -j 2>/dev/null | jq -r ' if length == 0 then empty else .[-1] as $n | (if $n.app_name != null and $n.app_name != "" then $n.app_name + ": " else "" end) + ($n.summary // "") + (if $n.body != null and $n.body != "" then " — " + $n.body[0:80] else "" end) end' 2>/dev/null | sed 's/&/\&/g; s//\>/g'