mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-29 05:31:55 +02:00
feat(bar): add modifiers for strftime integer formatters
Added the ability of use modifiers with custom format on the Date widget. For example if using %U returns 04, you can add a modifier so that bar date widget shows 05.
This commit is contained in:
@@ -198,6 +198,38 @@
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"description": "Custom format with modifiers",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"CustomModifiers"
|
||||
],
|
||||
"properties": {
|
||||
"CustomModifiers": {
|
||||
"description": "Custom format with additive modifiers for integer format specifiers",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"format",
|
||||
"modifiers"
|
||||
],
|
||||
"properties": {
|
||||
"format": {
|
||||
"description": "Custom format (https://docs.rs/chrono/latest/chrono/format/strftime/index.html)",
|
||||
"type": "string"
|
||||
},
|
||||
"modifiers": {
|
||||
"description": "Additive modifiers for integer format specifiers (e.g. { \"%U\": 1 } to increment the zero-indexed week number by 1)",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1413,6 +1445,38 @@
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"description": "Custom format with modifiers",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"CustomModifiers"
|
||||
],
|
||||
"properties": {
|
||||
"CustomModifiers": {
|
||||
"description": "Custom format with additive modifiers for integer format specifiers",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"format",
|
||||
"modifiers"
|
||||
],
|
||||
"properties": {
|
||||
"format": {
|
||||
"description": "Custom format (https://docs.rs/chrono/latest/chrono/format/strftime/index.html)",
|
||||
"type": "string"
|
||||
},
|
||||
"modifiers": {
|
||||
"description": "Additive modifiers for integer format specifiers (e.g. { \"%U\": 1 } to increment the zero-indexed week number by 1)",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2561,6 +2625,38 @@
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"description": "Custom format with modifiers",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"CustomModifiers"
|
||||
],
|
||||
"properties": {
|
||||
"CustomModifiers": {
|
||||
"description": "Custom format with additive modifiers for integer format specifiers",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"format",
|
||||
"modifiers"
|
||||
],
|
||||
"properties": {
|
||||
"format": {
|
||||
"description": "Custom format (https://docs.rs/chrono/latest/chrono/format/strftime/index.html)",
|
||||
"type": "string"
|
||||
},
|
||||
"modifiers": {
|
||||
"description": "Additive modifiers for integer format specifiers (e.g. { \"%U\": 1 } to increment the zero-indexed week number by 1)",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user