moonarch/defaults/bin/moonarch-waybar-nightlight
nevaforget 0433f08f08
All checks were successful
Update PKGBUILD version / update-pkgver (push) Successful in 4s
feat: manage wlsunset via systemd user service
Move nightlight from niri spawn-at-startup to a systemd user service
with After=kanshi.service to ensure all outputs are configured before
wlsunset starts. Toggle now uses enable/disable --now for persistent
state across reboots.
2026-04-14 17:42:24 +02:00

10 lines
377 B
Bash
Executable File

#!/bin/bash
# ABOUTME: Outputs JSON status for waybar nightlight module.
# ABOUTME: Checks wlsunset systemd service, shows warm icon when active.
if systemctl --user is-active --quiet wlsunset; then
jq -nc '{text: "󰌵", alt: "on", tooltip: "Nightlight: An (5000K)", class: "on"}'
else
jq -nc '{text: "󰌶", alt: "off", tooltip: "Nightlight: Aus", class: "off"}'
fi