♻️ refactor: move WaylandWindow to utils module for reusability
This commit is contained in:
1 parent
c626734a00
commit
eaa3b7e17d
6 files changed
+370
-7
No files matched your search
+1
-1
@@ -7,7 +7,7 @@ from fabric.widgets.button import Button
|
||||
from fabric.widgets.centerbox import CenterBox
|
||||
from fabric.widgets.datetime import DateTime
|
||||
from fabric.widgets.label import Label
|
||||
from fabric.widgets.wayland import WaylandWindow as Window
|
||||
from utils.wayland import WaylandWindow as Window
|
||||
from modules.bar.components import Metrics, workspace, SystemIndicators, UpdatesWidget
|
||||
import config.data as data
|
||||
from gi.repository import Gdk, GLib
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ from fabric.widgets.box import Box
|
||||
from fabric.widgets.button import Button
|
||||
from fabric.widgets.image import Image
|
||||
from fabric.widgets.eventbox import EventBox
|
||||
from fabric.widgets.wayland import WaylandWindow as Window
|
||||
from utils.wayland import WaylandWindow as Window
|
||||
from fabric.hyprland.widgets import get_hyprland_connection
|
||||
from fabric.utils import (
|
||||
exec_shell_command,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from fabric.widgets.centerbox import CenterBox
|
||||
from fabric.widgets.stack import Stack
|
||||
from fabric.widgets.wayland import WaylandWindow as Window
|
||||
from utils.wayland import WaylandWindow as Window
|
||||
from fabric.widgets.box import Box
|
||||
from modules.launcher.components import (
|
||||
AppLauncher,
|
||||
|
||||
@@ -12,7 +12,7 @@ from fabric.widgets.image import Image
|
||||
from fabric.widgets.centerbox import CenterBox
|
||||
from fabric.widgets.label import Label
|
||||
from fabric.widgets.revealer import Revealer
|
||||
from fabric.widgets.wayland import WaylandWindow as Window
|
||||
from utils.wayland import WaylandWindow as Window
|
||||
from utils import CustomImage
|
||||
import utils.icons as icons
|
||||
from services import notification_service
|
||||
@@ -291,7 +291,7 @@ class NotificationPopup(Window):
|
||||
notification: Notification = fabric_notif.get_notification_from_id(id)
|
||||
# Always cache the notification regardless of DND status
|
||||
self.cache_notification_service.cache_notification(notification)
|
||||
|
||||
|
||||
# Only show popup if DND is not enabled
|
||||
if not self.cache_notification_service.dont_disturb:
|
||||
new_box = NotificationRevealer(fabric_notif.get_notification_from_id(id))
|
||||
@@ -299,4 +299,8 @@ class NotificationPopup(Window):
|
||||
new_box.set_reveal_child(True)
|
||||
logger.info(f"[Notification] New notification from {notification.app_name}")
|
||||
else:
|
||||
logger.info(f"[Notification] DND enabled, notification from {notification.app_name} not shown")
|
||||
logger.info(
|
||||
f"[Notification] DND enabled, notification from {
|
||||
notification.app_name
|
||||
} not shown"
|
||||
)
|
||||
+1
-1
@@ -4,7 +4,7 @@ from typing import ClassVar
|
||||
from fabric.audio import Audio
|
||||
from fabric.widgets.box import Box
|
||||
from fabric.widgets.scale import Scale, ScaleMark
|
||||
from fabric.widgets.wayland import WaylandWindow as Window
|
||||
from utils.wayland import WaylandWindow as Window
|
||||
from fabric.utils import invoke_repeater
|
||||
from gi.repository import GObject
|
||||
from services.brightness import Brightness
|
||||
|
||||
Reference in new issue
Block a user