Skip to main content

parse_gnome_show_banners_dnd

Function parse_gnome_show_banners_dnd 

Source
pub(crate) fn parse_gnome_show_banners_dnd(gsettings_output: &str) -> bool
Expand description

GNOME exposes “Do Not Disturb” as the inverse of org.gnome.desktop.notifications show-banners: when banners are turned off, DnD is on. gsettings get prints the GVariant literal true / false (with a trailing newline). Anything we can’t parse as an explicit false is treated as “banners on” → DnD off, so a missing key or unexpected output fails safe (breaks keep firing).

Un-gated so it’s unit-tested on every OS; only linux::check calls it in a non-test build.