From 7917eea54b04f6a54fb0b32133396038db8e61aa Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Sun, 26 Jul 2026 13:48:34 +0545 Subject: [PATCH] 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. --- docs/configuration.md | 1 + src/utils/constants.py | 1 + src/window/panel/main.py | 9 ++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index afe520b..afeffb8 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -70,6 +70,7 @@ Auto-generated on first run with sensible defaults. Most changes require restart | `date_time` | bool | `true` | Date/time indicator | | `workspace_indicator` | bool | `true` | Workspace indicator | | `notification_center` | bool | `true` | Notification center | +| `notch` | bool | `true` | Center notch (player, indicators, recording) | | `custom_mods` | bool | `true` | Custom panel buttons from `mods.toml` | | `window_switcher` | bool | `true` | Alt-Tab window switcher | | `osd` | bool | `true` | Volume/brightness on-screen display | diff --git a/src/utils/constants.py b/src/utils/constants.py index 9b95844..95d72ad 100644 --- a/src/utils/constants.py +++ b/src/utils/constants.py @@ -21,6 +21,7 @@ DEFAULT = { "bluetooth": True, "date_time": True, "night_light_temperature": 4500, + "notch": True, "custom_mods": True, "keyboard_layouts": ["us"], "switcher_live_preview": True, diff --git a/src/window/panel/main.py b/src/window/panel/main.py index 910ecbe..945ce7c 100644 --- a/src/window/panel/main.py +++ b/src/window/panel/main.py @@ -140,7 +140,7 @@ class Panel(Window): # Create boxes and mount self.left_box = Box(name="window-left") 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.children = CenterBox( @@ -271,6 +271,12 @@ class Panel(Window): if bluetooth_visible: 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_children = [] if config_data.get("imac_button", True): @@ -319,6 +325,7 @@ class Panel(Window): keys = { "imac_button", "global_menu", + "notch", "custom_mods", "workspace_indicator", "systray",