Unverified Commit 4eae2759 authored by ArijanJ's avatar ArijanJ Committed by GitHub

Make notification grouping optional (#376) (#575)

* Make notification grouping optional (#376) * Renamed the option to notification-grouping --------- Co-authored-by: 's avatarErik Reider <35975961+ErikReider@users.noreply.github.com>
parent 5d443edb
...@@ -111,6 +111,11 @@ config file to be able to detect config errors ...@@ -111,6 +111,11 @@ config file to be able to detect config errors
default: true ++ default: true ++
description: If control center should use keyboard shortcuts description: If control center should use keyboard shortcuts
*notification-grouping* ++
type: bool ++
default: true ++
description: If notifications should be grouped by app name
*image-visibility* ++ *image-visibility* ++
type: string ++ type: string ++
default: always ++ default: always ++
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
"control-center-height": 600, "control-center-height": 600,
"notification-window-width": 500, "notification-window-width": 500,
"keyboard-shortcuts": true, "keyboard-shortcuts": true,
"notification-grouping": true,
"image-visibility": "when-available", "image-visibility": "when-available",
"transition-time": 200, "transition-time": 200,
"hide-on-clear": false, "hide-on-clear": false,
......
...@@ -441,6 +441,11 @@ namespace SwayNotificationCenter { ...@@ -441,6 +441,11 @@ namespace SwayNotificationCenter {
*/ */
public bool keyboard_shortcuts { get; set; default = true; } public bool keyboard_shortcuts { get; set; default = true; }
/**
* If notifications should be grouped by app name
*/
public bool notification_grouping { get; set; default = true; }
/** Specifies if the notification image should be shown or not */ /** Specifies if the notification image should be shown or not */
public ImageVisibility image_visibility { public ImageVisibility image_visibility {
get; get;
......
...@@ -165,6 +165,11 @@ ...@@ -165,6 +165,11 @@
"description": "If control center should use keyboard shortcuts", "description": "If control center should use keyboard shortcuts",
"default": true "default": true
}, },
"notification-grouping": {
"type": "boolean",
"description": "If notifications should be grouped by app name",
"default": true
},
"image-visibility": { "image-visibility": {
"type": "string", "type": "string",
"description": "The notification image visibility when no icon is available.", "description": "The notification image visibility when no icon is available.",
......
...@@ -708,7 +708,7 @@ namespace SwayNotificationCenter { ...@@ -708,7 +708,7 @@ namespace SwayNotificationCenter {
if (param.name_id.length > 0) { if (param.name_id.length > 0) {
noti_groups_name.lookup_extended (param.name_id, null, out group); noti_groups_name.lookup_extended (param.name_id, null, out group);
} }
if (group == null) { if (group == null || ConfigModel.instance.notification_grouping == false) {
group = new NotificationGroup (param.name_id, param.display_name); group = new NotificationGroup (param.name_id, param.display_name);
// Collapse other groups on expand // Collapse other groups on expand
group.on_expand_change.connect ((expanded) => { group.on_expand_change.connect ((expanded) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment