Unverified Commit 90688d0f authored by Erik Reider's avatar Erik Reider Committed by GitHub

Added config option to set cc exclusive zone (#321)

parent 0d368c2f
...@@ -68,6 +68,13 @@ config file to be able to detect config errors ...@@ -68,6 +68,13 @@ config file to be able to detect config errors
description: Layer of control center window relative to normal windows. ++ description: Layer of control center window relative to normal windows. ++
background is below all windows, overlay is above all windows. background is below all windows, overlay is above all windows.
*control-center-exclusive-zone* ++
type: bool ++
default: true ++
description: Whether or not the control center should follow the ++
compositors exclusive zones. An example would be setting it to ++
*false* to cover your panel/dock.
*notification-2fa-action* ++ *notification-2fa-action* ++
type: bool ++ type: bool ++
default: true ++ default: true ++
......
...@@ -467,6 +467,10 @@ namespace SwayNotificationCenter { ...@@ -467,6 +467,10 @@ namespace SwayNotificationCenter {
get; set; default = Layer.TOP; get; set; default = Layer.TOP;
} }
public bool control_center_exclusive_zone {
get; set; default = true;
}
/** Categories settings */ /** Categories settings */
public OrderedHashTable<Category> categories_settings { public OrderedHashTable<Category> categories_settings {
get; get;
......
...@@ -75,6 +75,11 @@ ...@@ -75,6 +75,11 @@
"default": "none", "default": "none",
"enum": ["background", "bottom", "top", "overlay", "none"] "enum": ["background", "bottom", "top", "overlay", "none"]
}, },
"control-center-exclusive-zone": {
"type": "boolean",
"description": "Whether or not the control center should follow the compositors exclusive zones. An example would be setting it to \"false\" to cover your panel/dock.",
"default": true
},
"notification-2fa-action": { "notification-2fa-action": {
"type": "boolean", "type": "boolean",
"description": "If each notification should display a 'COPY \"1234\"' action", "description": "If each notification should display a 'COPY \"1234\"' action",
......
...@@ -270,6 +270,9 @@ namespace SwayNotificationCenter { ...@@ -270,6 +270,9 @@ namespace SwayNotificationCenter {
/** Resets the UI positions */ /** Resets the UI positions */
private void set_anchor () { private void set_anchor () {
if (swaync_daemon.use_layer_shell) { if (swaync_daemon.use_layer_shell) {
// Set the exlusive zone
int exclusive_zone = ConfigModel.instance.control_center_exclusive_zone ? 0 : 100;
GtkLayerShell.set_exclusive_zone (this, exclusive_zone);
// Grabs the keyboard input until closed // Grabs the keyboard input until closed
bool keyboard_shortcuts = ConfigModel.instance.keyboard_shortcuts; bool keyboard_shortcuts = ConfigModel.instance.keyboard_shortcuts;
#if HAVE_LATEST_GTK_LAYER_SHELL #if HAVE_LATEST_GTK_LAYER_SHELL
......
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