swaynotificationcenter: port text blob to structured nix config

This commit is contained in:
Colin 2023-09-06 09:03:19 +00:00
parent 507753b3dc
commit cc9ff2a2b0

View File

@ -10,76 +10,74 @@
{ {
sane.programs.swaynotificationcenter = { sane.programs.swaynotificationcenter = {
# fs.".config/swaync/style.css".symlink.text = ... # fs.".config/swaync/style.css".symlink.text = ...
fs.".config/swaync/config.json".symlink.text = '' fs.".config/swaync/config.json".symlink.text = builtins.toJSON {
{ "$schema" = "/etc/xdg/swaync/configSchema.json";
"$schema": "/etc/xdg/swaync/configSchema.json", positionX = "right";
"positionX": "right", positionY = "top";
"positionY": "top", layer = "overlay";
"layer": "overlay", control-center-layer = "top";
"control-center-layer": "top", layer-shell = true;
"layer-shell": true, cssPriority = "application";
"cssPriority": "application", control-center-margin-top = 0;
"control-center-margin-top": 0, control-center-margin-bottom = 0;
"control-center-margin-bottom": 0, control-center-margin-right = 0;
"control-center-margin-right": 0, control-center-margin-left = 0;
"control-center-margin-left": 0, notification-2fa-action = true;
"notification-2fa-action": true, notification-inline-replies = false;
"notification-inline-replies": false, notification-icon-size = 64;
"notification-icon-size": 64, notification-body-image-height = 100;
"notification-body-image-height": 100, notification-body-image-width = 200;
"notification-body-image-width": 200, timeout = 10;
"timeout": 10, timeout-low = 5;
"timeout-low": 5, timeout-critical = 0;
"timeout-critical": 0, fit-to-screen = true;
"fit-to-screen": true, control-center-width = 500;
"control-center-width": 500, control-center-height = 600;
"control-center-height": 600, notification-window-width = 500;
"notification-window-width": 500, keyboard-shortcuts = true;
"keyboard-shortcuts": true, image-visibility = "when-available";
"image-visibility": "when-available", transition-time = 200;
"transition-time": 200, hide-on-clear = false;
"hide-on-clear": false, hide-on-action = true;
"hide-on-action": true, script-fail-notify = true;
"script-fail-notify": true, scripts = {
"scripts": { };
}, notification-visibility = {
"notification-visibility": { example-name = {
"example-name": { state = "muted";
"state": "muted", urgency = "Low";
"urgency": "Low", app-name = "Spotify";
"app-name": "Spotify" };
} };
}, widgets = [
"widgets": [ "inhibitors"
"inhibitors", "title"
"title", "dnd"
"dnd", "notifications"
"notifications" ];
], widget-config = {
"widget-config": { inhibitors = {
"inhibitors": { text = "Inhibitors";
"text": "Inhibitors", button-text = "Clear All";
"button-text": "Clear All", clear-all-button = true;
"clear-all-button": true };
}, title = {
"title": { text = "Notifications";
"text": "Notifications", clear-all-button = true;
"clear-all-button": true, button-text = "Clear All";
"button-text": "Clear All" };
}, dnd = {
"dnd": { text = "Do Not Disturb";
"text": "Do Not Disturb" };
}, label = {
"label": { max-lines = 5;
"max-lines": 5, text = "Label Text";
"text": "Label Text" };
}, mpris = {
"mpris": { image-size = 96;
"image-size": 96, image-radius = 12;
"image-radius": 12 };
} };
} };
}
'';
}; };
} }