Headless service that follows niri msg -j event-stream and enables notification Do Not Disturb via the host IPC (notification-dnd-set) while at least one screencast is active, restoring it afterwards. Side effects: spawns a persistent shell retry loop around `niri msg -j event-stream`, runs `niri msg -j casts` / `niri msg version` and `noctalia msg notification-dnd-*` on demand. No network access, no filesystem writes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
40 lines
1.3 KiB
TOML
40 lines
1.3 KiB
TOML
# ShareDND — automatic Do Not Disturb while the screen is being shared.
|
|
#
|
|
# A headless [[service]] follows `niri msg -j event-stream` and re-queries
|
|
# `niri msg -j casts` on every Cast* event. When the first screencast
|
|
# appears, notification DND is enabled through the host IPC
|
|
# (notification-dnd-set); when the last one disappears, DND is restored.
|
|
# If DND was already on before sharing started, the plugin does not take
|
|
# ownership and leaves it on afterwards (configurable).
|
|
#
|
|
# External requirements: niri (screencast events come from niri IPC).
|
|
|
|
id = "whyoolw/sharednd"
|
|
name = "ShareDND"
|
|
version = "1.0.0"
|
|
min_noctalia = "5.0.0"
|
|
author = "whyoolw"
|
|
license = "MIT"
|
|
dependencies = ["niri"]
|
|
tags = ["notifications", "privacy", "niri"]
|
|
icon = "screen-share"
|
|
description = "Enables notification Do Not Disturb while the screen is shared (niri screencast) and turns notifications back on when sharing stops. Requires niri."
|
|
|
|
[[setting]]
|
|
key = "only_active"
|
|
type = "bool"
|
|
label_key = "settings.only_active.label"
|
|
description_key = "settings.only_active.description"
|
|
default = false
|
|
|
|
[[setting]]
|
|
key = "always_off_after"
|
|
type = "bool"
|
|
label_key = "settings.always_off_after.label"
|
|
description_key = "settings.always_off_after.description"
|
|
default = false
|
|
|
|
[[service]]
|
|
id = "service"
|
|
entry = "service.luau"
|