mirror of
https://github.com/ErikReider/SwayNotificationCenter.git
synced 2024-10-05 21:08:40 +03:00
Close control center when clearing all notifications (#53)
* Close control center when clearing all notifications * make hide on clear configurable, disabled by default
This commit is contained in:
parent
c345804df8
commit
37142fcb37
@ -93,6 +93,7 @@ To reload the config, you'll need to run `swaync-client --reload-config`
|
||||
- `image-visibility`: `always`, `when-available` or `never`. Notification image visiblilty
|
||||
- `transition-time`: uint (Any positive number, 0 to disable). The notification animation duration
|
||||
- `notification-window-width`: uint (Any positive number). Width of the notification in pixels
|
||||
- `hide-on-clear`: bool. Hides the control center after pressing "Clear All"
|
||||
|
||||
The main CSS style file is located in `/etc/xdg/swaync/style.css`. Copy it over to your `.config/swaync/` folder to customize without needing root access.
|
||||
|
||||
|
@ -7,5 +7,6 @@
|
||||
"notification-window-width": 500,
|
||||
"keyboard-shortcuts": true,
|
||||
"image-visibility": "always",
|
||||
"transition-time": 200
|
||||
"transition-time": 200,
|
||||
"hide-on-clear": false
|
||||
}
|
||||
|
@ -149,6 +149,11 @@ namespace SwayNotificatonCenter {
|
||||
*/
|
||||
public int notification_window_width { get; set; default = 500; }
|
||||
|
||||
/*
|
||||
* Hides the control center after clearing all notifications
|
||||
*/
|
||||
public bool hide_on_clear { get; set; default = false; }
|
||||
|
||||
/* Methods */
|
||||
|
||||
/**
|
||||
|
@ -218,6 +218,10 @@ namespace SwayNotificatonCenter {
|
||||
} catch (Error e) {
|
||||
stderr.printf (e.message + "\n");
|
||||
}
|
||||
|
||||
if (ConfigModel.instance.hide_on_clear) {
|
||||
this.set_visibility (false);
|
||||
}
|
||||
}
|
||||
|
||||
private void navigate_list (uint i) {
|
||||
|
Loading…
Reference in New Issue
Block a user