feat(panel): add notch toggle to config.toml
Matches existing pattern for global_menu, systray, etc. Set notch = false to hide center notch from panel.
This commit is contained in:
3 files changed
+10
-1
No files matched your search
@@ -70,6 +70,7 @@ Auto-generated on first run with sensible defaults. Most changes require restart
|
|||||||
| `date_time` | bool | `true` | Date/time indicator |
|
| `date_time` | bool | `true` | Date/time indicator |
|
||||||
| `workspace_indicator` | bool | `true` | Workspace indicator |
|
| `workspace_indicator` | bool | `true` | Workspace indicator |
|
||||||
| `notification_center` | bool | `true` | Notification center |
|
| `notification_center` | bool | `true` | Notification center |
|
||||||
|
| `notch` | bool | `true` | Center notch (player, indicators, recording) |
|
||||||
| `custom_mods` | bool | `true` | Custom panel buttons from `mods.toml` |
|
| `custom_mods` | bool | `true` | Custom panel buttons from `mods.toml` |
|
||||||
| `window_switcher` | bool | `true` | Alt-Tab window switcher |
|
| `window_switcher` | bool | `true` | Alt-Tab window switcher |
|
||||||
| `osd` | bool | `true` | Volume/brightness on-screen display |
|
| `osd` | bool | `true` | Volume/brightness on-screen display |
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ DEFAULT = {
|
|||||||
"bluetooth": True,
|
"bluetooth": True,
|
||||||
"date_time": True,
|
"date_time": True,
|
||||||
"night_light_temperature": 4500,
|
"night_light_temperature": 4500,
|
||||||
|
"notch": True,
|
||||||
"custom_mods": True,
|
"custom_mods": True,
|
||||||
"keyboard_layouts": ["us"],
|
"keyboard_layouts": ["us"],
|
||||||
"switcher_live_preview": True,
|
"switcher_live_preview": True,
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ class Panel(Window):
|
|||||||
# Create boxes and mount
|
# Create boxes and mount
|
||||||
self.left_box = Box(name="window-left")
|
self.left_box = Box(name="window-left")
|
||||||
self.notch = Notch()
|
self.notch = Notch()
|
||||||
self.center_box = Box(name="window-center", children=self.notch)
|
self.center_box = Box(name="window-center")
|
||||||
self.right_box = Box(name="window-right", spacing=4, orientation="h")
|
self.right_box = Box(name="window-right", spacing=4, orientation="h")
|
||||||
|
|
||||||
self.children = CenterBox(
|
self.children = CenterBox(
|
||||||
@@ -271,6 +271,12 @@ class Panel(Window):
|
|||||||
if bluetooth_visible:
|
if bluetooth_visible:
|
||||||
self.bluetooth_indicator.update_state()
|
self.bluetooth_indicator.update_state()
|
||||||
|
|
||||||
|
# Center (notch)
|
||||||
|
if config_data.get("notch", True):
|
||||||
|
self.center_box.children = [self.notch]
|
||||||
|
else:
|
||||||
|
self.center_box.children = []
|
||||||
|
|
||||||
# Left
|
# Left
|
||||||
left_children = []
|
left_children = []
|
||||||
if config_data.get("imac_button", True):
|
if config_data.get("imac_button", True):
|
||||||
@@ -319,6 +325,7 @@ class Panel(Window):
|
|||||||
keys = {
|
keys = {
|
||||||
"imac_button",
|
"imac_button",
|
||||||
"global_menu",
|
"global_menu",
|
||||||
|
"notch",
|
||||||
"custom_mods",
|
"custom_mods",
|
||||||
"workspace_indicator",
|
"workspace_indicator",
|
||||||
"systray",
|
"systray",
|
||||||
|
|||||||
Reference in new issue
Block a user