feat: add whyoolw/sharednd — auto DND while screen sharing (niri)
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>
This commit is contained in:
co-authored by
Claude Fable 5
parent
74dc5fcd81
commit
704fa538b0
@@ -0,0 +1,39 @@
|
||||
# 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"
|
||||
Reference in New Issue
Block a user