mirror of
https://github.com/ErikReider/SwayNotificationCenter.git
synced 2024-10-05 21:08:40 +03:00
Added config option to set cc exclusive zone (#321)
This commit is contained in:
parent
0d368c2f07
commit
90688d0fe9
@ -68,6 +68,13 @@ config file to be able to detect config errors
|
||||
description: Layer of control center window relative to normal 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* ++
|
||||
type: bool ++
|
||||
default: true ++
|
||||
|
@ -467,6 +467,10 @@ namespace SwayNotificationCenter {
|
||||
get; set; default = Layer.TOP;
|
||||
}
|
||||
|
||||
public bool control_center_exclusive_zone {
|
||||
get; set; default = true;
|
||||
}
|
||||
|
||||
/** Categories settings */
|
||||
public OrderedHashTable<Category> categories_settings {
|
||||
get;
|
||||
|
@ -75,6 +75,11 @@
|
||||
"default": "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": {
|
||||
"type": "boolean",
|
||||
"description": "If each notification should display a 'COPY \"1234\"' action",
|
||||
|
@ -270,6 +270,9 @@ namespace SwayNotificationCenter {
|
||||
/** Resets the UI positions */
|
||||
private void set_anchor () {
|
||||
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
|
||||
bool keyboard_shortcuts = ConfigModel.instance.keyboard_shortcuts;
|
||||
#if HAVE_LATEST_GTK_LAYER_SHELL
|
||||
|
Loading…
Reference in New Issue
Block a user