mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-24 18:31:22 +01:00
feat(bar): auto select/hide widget based on value
This commit adds new settings to some widgets that allows to auto select/hide them based on their current values. The cpu/memory/network/storage widgets get a setting that auto selects the widget if the current value/percentage is over a value. The battery widget gets a setting that auto selects the widget if the current percentage is under a value. The storage widget gets a setting that auto hides the disk widget if the percentage is under a value. Also added 2 new settings (auto_select_fill and auto_select_text) to the theme, in order to select the fill and text colors of an auto selected widget. (Easter egg: the network icons change if the value is over the limit) PR: #1353
This commit is contained in:
404
schema.bar.json
404
schema.bar.json
@@ -26,6 +26,12 @@
|
||||
"enable"
|
||||
],
|
||||
"properties": {
|
||||
"auto_select_under": {
|
||||
"description": "Select when the current percentage is under this value [[1-100]]",
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"data_refresh_interval": {
|
||||
"description": "Data refresh interval (default: 10 seconds)",
|
||||
"type": "integer",
|
||||
@@ -90,6 +96,12 @@
|
||||
"enable"
|
||||
],
|
||||
"properties": {
|
||||
"auto_select_over": {
|
||||
"description": "Select when the current percentage is over this value [[1-100]]",
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"data_refresh_interval": {
|
||||
"description": "Data refresh interval (default: 10 seconds)",
|
||||
"type": "integer",
|
||||
@@ -752,6 +764,12 @@
|
||||
"enable"
|
||||
],
|
||||
"properties": {
|
||||
"auto_select_over": {
|
||||
"description": "Select when the current percentage is over this value [[1-100]]",
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"data_refresh_interval": {
|
||||
"description": "Data refresh interval (default: 10 seconds)",
|
||||
"type": "integer",
|
||||
@@ -810,10 +828,46 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"enable",
|
||||
"show_network_activity",
|
||||
"show_total_data_transmitted"
|
||||
"show_activity",
|
||||
"show_total_activity"
|
||||
],
|
||||
"properties": {
|
||||
"activity_left_padding": {
|
||||
"description": "Characters to reserve for received and transmitted activity",
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"auto_select": {
|
||||
"description": "Select when the value is over a limit (1MiB is 1048576 bytes (1024*1024))",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"received_over": {
|
||||
"description": "Select the received data when it's over this value",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"total_received_over": {
|
||||
"description": "Select the total received data when it's over this value",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"total_transmitted_over": {
|
||||
"description": "Select the total transmitted data when it's over this value",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"transmitted_over": {
|
||||
"description": "Select the transmitted data when it's over this value",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
"data_refresh_interval": {
|
||||
"description": "Data refresh interval (default: 10 seconds)",
|
||||
"type": "integer",
|
||||
@@ -857,22 +911,16 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"network_activity_fill_characters": {
|
||||
"description": "Characters to reserve for network activity data",
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
"show_activity": {
|
||||
"description": "Show received and transmitted activity",
|
||||
"type": "boolean"
|
||||
},
|
||||
"show_default_interface": {
|
||||
"description": "Show default interface",
|
||||
"type": "boolean"
|
||||
},
|
||||
"show_network_activity": {
|
||||
"description": "Show network activity",
|
||||
"type": "boolean"
|
||||
},
|
||||
"show_total_data_transmitted": {
|
||||
"description": "Show total data transmitted",
|
||||
"show_total_activity": {
|
||||
"description": "Show total received and transmitted activity",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
@@ -892,6 +940,18 @@
|
||||
"enable"
|
||||
],
|
||||
"properties": {
|
||||
"auto_hide_under": {
|
||||
"description": "Hide when the current percentage is under this value [[1-100]]",
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"auto_select_over": {
|
||||
"description": "Select when the current percentage is over this value [[1-100]]",
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"data_refresh_interval": {
|
||||
"description": "Data refresh interval (default: 10 seconds)",
|
||||
"type": "integer",
|
||||
@@ -1493,6 +1553,12 @@
|
||||
"enable"
|
||||
],
|
||||
"properties": {
|
||||
"auto_select_under": {
|
||||
"description": "Select when the current percentage is under this value [[1-100]]",
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"data_refresh_interval": {
|
||||
"description": "Data refresh interval (default: 10 seconds)",
|
||||
"type": "integer",
|
||||
@@ -1557,6 +1623,12 @@
|
||||
"enable"
|
||||
],
|
||||
"properties": {
|
||||
"auto_select_over": {
|
||||
"description": "Select when the current percentage is over this value [[1-100]]",
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"data_refresh_interval": {
|
||||
"description": "Data refresh interval (default: 10 seconds)",
|
||||
"type": "integer",
|
||||
@@ -2219,6 +2291,12 @@
|
||||
"enable"
|
||||
],
|
||||
"properties": {
|
||||
"auto_select_over": {
|
||||
"description": "Select when the current percentage is over this value [[1-100]]",
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"data_refresh_interval": {
|
||||
"description": "Data refresh interval (default: 10 seconds)",
|
||||
"type": "integer",
|
||||
@@ -2277,10 +2355,46 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"enable",
|
||||
"show_network_activity",
|
||||
"show_total_data_transmitted"
|
||||
"show_activity",
|
||||
"show_total_activity"
|
||||
],
|
||||
"properties": {
|
||||
"activity_left_padding": {
|
||||
"description": "Characters to reserve for received and transmitted activity",
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"auto_select": {
|
||||
"description": "Select when the value is over a limit (1MiB is 1048576 bytes (1024*1024))",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"received_over": {
|
||||
"description": "Select the received data when it's over this value",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"total_received_over": {
|
||||
"description": "Select the total received data when it's over this value",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"total_transmitted_over": {
|
||||
"description": "Select the total transmitted data when it's over this value",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"transmitted_over": {
|
||||
"description": "Select the transmitted data when it's over this value",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
"data_refresh_interval": {
|
||||
"description": "Data refresh interval (default: 10 seconds)",
|
||||
"type": "integer",
|
||||
@@ -2324,22 +2438,16 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"network_activity_fill_characters": {
|
||||
"description": "Characters to reserve for network activity data",
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
"show_activity": {
|
||||
"description": "Show received and transmitted activity",
|
||||
"type": "boolean"
|
||||
},
|
||||
"show_default_interface": {
|
||||
"description": "Show default interface",
|
||||
"type": "boolean"
|
||||
},
|
||||
"show_network_activity": {
|
||||
"description": "Show network activity",
|
||||
"type": "boolean"
|
||||
},
|
||||
"show_total_data_transmitted": {
|
||||
"description": "Show total data transmitted",
|
||||
"show_total_activity": {
|
||||
"description": "Show total received and transmitted activity",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
@@ -2359,6 +2467,18 @@
|
||||
"enable"
|
||||
],
|
||||
"properties": {
|
||||
"auto_hide_under": {
|
||||
"description": "Hide when the current percentage is under this value [[1-100]]",
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"auto_select_over": {
|
||||
"description": "Select when the current percentage is over this value [[1-100]]",
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"data_refresh_interval": {
|
||||
"description": "Data refresh interval (default: 10 seconds)",
|
||||
"type": "integer",
|
||||
@@ -2893,6 +3013,12 @@
|
||||
"enable"
|
||||
],
|
||||
"properties": {
|
||||
"auto_select_under": {
|
||||
"description": "Select when the current percentage is under this value [[1-100]]",
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"data_refresh_interval": {
|
||||
"description": "Data refresh interval (default: 10 seconds)",
|
||||
"type": "integer",
|
||||
@@ -2957,6 +3083,12 @@
|
||||
"enable"
|
||||
],
|
||||
"properties": {
|
||||
"auto_select_over": {
|
||||
"description": "Select when the current percentage is over this value [[1-100]]",
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"data_refresh_interval": {
|
||||
"description": "Data refresh interval (default: 10 seconds)",
|
||||
"type": "integer",
|
||||
@@ -3619,6 +3751,12 @@
|
||||
"enable"
|
||||
],
|
||||
"properties": {
|
||||
"auto_select_over": {
|
||||
"description": "Select when the current percentage is over this value [[1-100]]",
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"data_refresh_interval": {
|
||||
"description": "Data refresh interval (default: 10 seconds)",
|
||||
"type": "integer",
|
||||
@@ -3677,10 +3815,46 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"enable",
|
||||
"show_network_activity",
|
||||
"show_total_data_transmitted"
|
||||
"show_activity",
|
||||
"show_total_activity"
|
||||
],
|
||||
"properties": {
|
||||
"activity_left_padding": {
|
||||
"description": "Characters to reserve for received and transmitted activity",
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"auto_select": {
|
||||
"description": "Select when the value is over a limit (1MiB is 1048576 bytes (1024*1024))",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"received_over": {
|
||||
"description": "Select the received data when it's over this value",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"total_received_over": {
|
||||
"description": "Select the total received data when it's over this value",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"total_transmitted_over": {
|
||||
"description": "Select the total transmitted data when it's over this value",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"transmitted_over": {
|
||||
"description": "Select the transmitted data when it's over this value",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
"data_refresh_interval": {
|
||||
"description": "Data refresh interval (default: 10 seconds)",
|
||||
"type": "integer",
|
||||
@@ -3724,22 +3898,16 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"network_activity_fill_characters": {
|
||||
"description": "Characters to reserve for network activity data",
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
"show_activity": {
|
||||
"description": "Show received and transmitted activity",
|
||||
"type": "boolean"
|
||||
},
|
||||
"show_default_interface": {
|
||||
"description": "Show default interface",
|
||||
"type": "boolean"
|
||||
},
|
||||
"show_network_activity": {
|
||||
"description": "Show network activity",
|
||||
"type": "boolean"
|
||||
},
|
||||
"show_total_data_transmitted": {
|
||||
"description": "Show total data transmitted",
|
||||
"show_total_activity": {
|
||||
"description": "Show total received and transmitted activity",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
@@ -3759,6 +3927,18 @@
|
||||
"enable"
|
||||
],
|
||||
"properties": {
|
||||
"auto_hide_under": {
|
||||
"description": "Hide when the current percentage is under this value [[1-100]]",
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"auto_select_over": {
|
||||
"description": "Select when the current percentage is over this value [[1-100]]",
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"data_refresh_interval": {
|
||||
"description": "Data refresh interval (default: 10 seconds)",
|
||||
"type": "integer",
|
||||
@@ -4035,6 +4215,68 @@
|
||||
"Crust"
|
||||
]
|
||||
},
|
||||
"auto_select_fill": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Rosewater",
|
||||
"Flamingo",
|
||||
"Pink",
|
||||
"Mauve",
|
||||
"Red",
|
||||
"Maroon",
|
||||
"Peach",
|
||||
"Yellow",
|
||||
"Green",
|
||||
"Teal",
|
||||
"Sky",
|
||||
"Sapphire",
|
||||
"Blue",
|
||||
"Lavender",
|
||||
"Text",
|
||||
"Subtext1",
|
||||
"Subtext0",
|
||||
"Overlay2",
|
||||
"Overlay1",
|
||||
"Overlay0",
|
||||
"Surface2",
|
||||
"Surface1",
|
||||
"Surface0",
|
||||
"Base",
|
||||
"Mantle",
|
||||
"Crust"
|
||||
]
|
||||
},
|
||||
"auto_select_text": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Rosewater",
|
||||
"Flamingo",
|
||||
"Pink",
|
||||
"Mauve",
|
||||
"Red",
|
||||
"Maroon",
|
||||
"Peach",
|
||||
"Yellow",
|
||||
"Green",
|
||||
"Teal",
|
||||
"Sky",
|
||||
"Sapphire",
|
||||
"Blue",
|
||||
"Lavender",
|
||||
"Text",
|
||||
"Subtext1",
|
||||
"Subtext0",
|
||||
"Overlay2",
|
||||
"Overlay1",
|
||||
"Overlay0",
|
||||
"Surface2",
|
||||
"Surface1",
|
||||
"Surface0",
|
||||
"Base",
|
||||
"Mantle",
|
||||
"Crust"
|
||||
]
|
||||
},
|
||||
"name": {
|
||||
"description": "Name of the Catppuccin theme (theme previews: https://github.com/catppuccin/catppuccin)",
|
||||
"type": "string",
|
||||
@@ -4082,6 +4324,48 @@
|
||||
"Base0F"
|
||||
]
|
||||
},
|
||||
"auto_select_fill": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Base00",
|
||||
"Base01",
|
||||
"Base02",
|
||||
"Base03",
|
||||
"Base04",
|
||||
"Base05",
|
||||
"Base06",
|
||||
"Base07",
|
||||
"Base08",
|
||||
"Base09",
|
||||
"Base0A",
|
||||
"Base0B",
|
||||
"Base0C",
|
||||
"Base0D",
|
||||
"Base0E",
|
||||
"Base0F"
|
||||
]
|
||||
},
|
||||
"auto_select_text": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Base00",
|
||||
"Base01",
|
||||
"Base02",
|
||||
"Base03",
|
||||
"Base04",
|
||||
"Base05",
|
||||
"Base06",
|
||||
"Base07",
|
||||
"Base08",
|
||||
"Base09",
|
||||
"Base0A",
|
||||
"Base0B",
|
||||
"Base0C",
|
||||
"Base0D",
|
||||
"Base0E",
|
||||
"Base0F"
|
||||
]
|
||||
},
|
||||
"name": {
|
||||
"description": "Name of the Base16 theme (theme previews: https://tinted-theming.github.io/tinted-gallery/)",
|
||||
"type": "string",
|
||||
@@ -4394,6 +4678,48 @@
|
||||
"Base0F"
|
||||
]
|
||||
},
|
||||
"auto_select_fill": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Base00",
|
||||
"Base01",
|
||||
"Base02",
|
||||
"Base03",
|
||||
"Base04",
|
||||
"Base05",
|
||||
"Base06",
|
||||
"Base07",
|
||||
"Base08",
|
||||
"Base09",
|
||||
"Base0A",
|
||||
"Base0B",
|
||||
"Base0C",
|
||||
"Base0D",
|
||||
"Base0E",
|
||||
"Base0F"
|
||||
]
|
||||
},
|
||||
"auto_select_text": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Base00",
|
||||
"Base01",
|
||||
"Base02",
|
||||
"Base03",
|
||||
"Base04",
|
||||
"Base05",
|
||||
"Base06",
|
||||
"Base07",
|
||||
"Base08",
|
||||
"Base09",
|
||||
"Base0A",
|
||||
"Base0B",
|
||||
"Base0C",
|
||||
"Base0D",
|
||||
"Base0E",
|
||||
"Base0F"
|
||||
]
|
||||
},
|
||||
"colours": {
|
||||
"description": "Colours of the custom Base16 theme palette",
|
||||
"type": "object",
|
||||
|
||||
Reference in New Issue
Block a user