mirror of
https://github.com/ErikReider/SwayNotificationCenter.git
synced 2024-10-05 21:08:40 +03:00
Added json schema (#65)
This commit is contained in:
parent
a91b440fd4
commit
5b505ca09b
@ -1,4 +1,5 @@
|
||||
{
|
||||
"$schema": @JSONPATH@,
|
||||
"positionX": "right",
|
||||
"positionY": "top",
|
||||
"control-center-margin-top": 0,
|
94
src/configSchema.json
Normal file
94
src/configSchema.json
Normal file
@ -0,0 +1,94 @@
|
||||
{
|
||||
"title": "SwayNotificationCenter JSON schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"positionX": {
|
||||
"type": "string",
|
||||
"description": "Horizontal position of control center and notification window",
|
||||
"default": "right",
|
||||
"enum": [
|
||||
"right",
|
||||
"left"
|
||||
]
|
||||
},
|
||||
"positionY": {
|
||||
"type": "string",
|
||||
"description": "Vertical position of control center and notification window",
|
||||
"default": "top",
|
||||
"enum": [
|
||||
"top",
|
||||
"bottom"
|
||||
]
|
||||
},
|
||||
"control-center-margin-top": {
|
||||
"type": "integer",
|
||||
"description": "The margin (in pixels) at the top of the notification center. 0 to disable",
|
||||
"default": 0
|
||||
},
|
||||
"control-center-margin-bottom": {
|
||||
"type": "integer",
|
||||
"description": "The margin (in pixels) at the bottom of the notification center. 0 to disable",
|
||||
"default": 0
|
||||
},
|
||||
"control-center-margin-right": {
|
||||
"type": "integer",
|
||||
"description": "The margin (in pixels) at the right of the notification center. 0 to disable",
|
||||
"default": 0
|
||||
},
|
||||
"control-center-margin-left": {
|
||||
"type": "integer",
|
||||
"description": "The margin (in pixels) at the left of the notification center. 0 to disable",
|
||||
"default": 0
|
||||
},
|
||||
"timeout": {
|
||||
"type": "integer",
|
||||
"description": "The notification timeout for notifications with normal priority",
|
||||
"default": 10
|
||||
},
|
||||
"timeout-low": {
|
||||
"type": "integer",
|
||||
"description": "The notification timeout for notifications with low priority",
|
||||
"default": 5
|
||||
},
|
||||
"timeout-critical": {
|
||||
"type": "integer",
|
||||
"description": "The notification timeout for notifications with critical priority. 0 to disable",
|
||||
"default": 0
|
||||
},
|
||||
"notification-window-width": {
|
||||
"type": "integer",
|
||||
"description": "Width of the notification in pixels",
|
||||
"default": 500
|
||||
},
|
||||
"keyboard-shortcuts": {
|
||||
"type": "boolean",
|
||||
"description": "If control center should use keyboard shortcuts",
|
||||
"default": true
|
||||
},
|
||||
"image-visibility": {
|
||||
"type": "string",
|
||||
"description": "An explanation about the purpose of this instance.",
|
||||
"default": "always",
|
||||
"enum": [
|
||||
"always",
|
||||
"when-available",
|
||||
"never"
|
||||
]
|
||||
},
|
||||
"transition-time": {
|
||||
"type": "integer",
|
||||
"description": "The notification animation duration. 0 to disable",
|
||||
"default": 200
|
||||
},
|
||||
"hide-on-clear": {
|
||||
"type": "boolean",
|
||||
"description": "Hides the control center after pressing \"Clear All\"",
|
||||
"default": false
|
||||
},
|
||||
"hide-on-action": {
|
||||
"type": "boolean",
|
||||
"description": "Hides the control center when clicking on notification action",
|
||||
"default": true
|
||||
}
|
||||
}
|
||||
}
|
@ -57,5 +57,16 @@ executable('swaync-client',
|
||||
install: true,
|
||||
)
|
||||
|
||||
install_data('style.css', install_dir : join_paths(sysconfdir, 'xdg/swaync'))
|
||||
install_data('config.json', install_dir : join_paths(sysconfdir, 'xdg/swaync'))
|
||||
config_path = join_paths(sysconfdir, 'xdg/swaync')
|
||||
|
||||
config_data = configuration_data()
|
||||
config_data.set_quoted('JSONPATH', join_paths('/', config_path, 'configSchema.json'))
|
||||
config_json = configure_file(
|
||||
input : 'config.json.in',
|
||||
output : 'config.json',
|
||||
configuration : config_data
|
||||
)
|
||||
|
||||
install_data('style.css', install_dir : config_path)
|
||||
install_data(config_json, install_dir : config_path)
|
||||
install_data('configSchema.json', install_dir : config_path)
|
||||
|
Loading…
Reference in New Issue
Block a user