Files
dotfiles/hyprlock/.local/bin/hyprlock-notifications.sh
sam_oneal 1755d17558 hyprlock: disable fingerprint, add battery/weather/notifications
- Disable fingerprint auth (GDM holds the device; hyprlock can't
  claim it, blocking the auth thread).
- Fix date format escaping (single quotes).
- Add battery, weather, and latest mako notification labels.
- Add hyprlock wrapper (crash guard), battery script, notifications
  script, and weather script.
2026-08-18 08:02:50 -06:00

16 lines
597 B
Bash
Executable File

#!/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/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g'