Skip to content
This repository was archived by the owner on Jan 29, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion modules/notch.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ def __init__(self, monitor_id: int = 0, **kwargs):
)

self._is_notch_open = False
self._current_widget = None
self._scrolling = False

if data.VERTICAL:
Expand Down Expand Up @@ -833,6 +834,7 @@ def close_notch(self):
self.bar.revealer_left.set_reveal_child(True)
self.applet_stack.set_visible_child(self.nhistory)
self._is_notch_open = False
self._current_widget = None
self.stack.set_visible_child(self.compact)
if data.PANEL_THEME != "Notch":
self.notch_revealer.set_reveal_child(False)
Expand All @@ -845,6 +847,20 @@ def close_notch(self):
else:
self.set_margin("-40px 8px 8px 8px")

def gesture_up(self):
"""Four-finger swipe up: close dashboard if open, otherwise open overview."""
if self._is_notch_open and self._current_widget == "dashboard":
self.close_notch()
elif not self._is_notch_open:
self.show_notch("overview")

def gesture_down(self):
"""Four-finger swipe down: close overview if open, otherwise open dashboard."""
if self._is_notch_open and self._current_widget == "overview":
self.close_notch()
elif not self._is_notch_open:
self.show_notch("dashboard")

def open_notch(self, widget_name: str):
# Debug info for troubleshooting
if hasattr(self, '_debug_monitor_focus') and self._debug_monitor_focus:
Expand Down Expand Up @@ -1059,8 +1075,15 @@ def _open_notch_internal(self, widget_name: str):

if self.bar and not self.bar.get_visible() and data.BAR_POSITION == "Top":
self.set_margin("0px 8px 8px 8px")

self._is_notch_open = True
# Track current widget for gesture handlers
if target_widget_on_stack == self.overview:
self._current_widget = "overview"
elif target_widget_on_stack == self.dashboard:
self._current_widget = "dashboard"
else:
self._current_widget = widget_name

def toggle_hidden(self):
self.hidden = not self.hidden
Expand Down