refactor! : drop subprocess usage and centralize brightness service initialization
This commit is contained in:
21 files changed
+834
-828
No files matched your search
@@ -2,11 +2,10 @@ from pathlib import Path
|
||||
|
||||
import tomlkit
|
||||
|
||||
from fabric.utils import GLib, logger
|
||||
from fabric.utils import GLib, Gio, logger
|
||||
from fabric.widgets.box import Box
|
||||
from fabric.widgets.button import Button
|
||||
from fabric.widgets.label import Label
|
||||
from gi.repository import Gio
|
||||
|
||||
from shared.window.applet_window import AppletWindow
|
||||
from utils.functions import run_command, thread
|
||||
@@ -171,6 +170,7 @@ class CustomMods(Box):
|
||||
def _rebuild(self, mods):
|
||||
for child in list(self.get_children()):
|
||||
self.remove(child)
|
||||
child.destroy()
|
||||
|
||||
for popup in self._mod_popups.values():
|
||||
if popup:
|
||||
|
||||
@@ -357,9 +357,6 @@ class GlobalMenuDropdowns:
|
||||
|
||||
def _on_menu_changed(self, _, menu_items: list):
|
||||
"""Handle menu changes from the GlobalMenuService."""
|
||||
logger.info(
|
||||
f"[GlobalMenu] _on_menu_changed called with {len(menu_items)} items"
|
||||
)
|
||||
self._rebuild_dynamic_menus(menu_items)
|
||||
|
||||
def _rebuild_dynamic_menus(self, menu_items: list):
|
||||
|
||||
@@ -13,17 +13,16 @@ from utils.roam import modus_service
|
||||
from utils.utils import setup_cursor_hover, svg_file
|
||||
from window.controlcenter.main import ModusControlCenter
|
||||
from window.notification.notification_center import NotificationCenter
|
||||
from window.panel.components.custom_mods import CustomMods
|
||||
from window.panel.components.enhanced_system_tray import apply_enhanced_system_tray
|
||||
from window.panel.components.globalmenu import GlobalMenu
|
||||
from window.panel.components.custom_mods import CustomMods
|
||||
from window.panel.notch import Notch
|
||||
from window.panel.components.indicators import (
|
||||
BatteryIndicator,
|
||||
BluetoothIndicator,
|
||||
NetworkIndicator,
|
||||
)
|
||||
|
||||
from window.panel.components.workspace import WorkspaceIndicator
|
||||
from window.panel.notch import Notch
|
||||
|
||||
apply_enhanced_system_tray()
|
||||
|
||||
|
||||
@@ -2,10 +2,9 @@ import math
|
||||
import os
|
||||
import time
|
||||
|
||||
from fabric.utils import GLib, Gtk
|
||||
from fabric.utils import GLib, Gtk, GdkPixbuf
|
||||
from fabric.widgets.box import Box
|
||||
from fabric.widgets.centerbox import CenterBox
|
||||
from gi.repository import GdkPixbuf
|
||||
|
||||
from services.mpris import PlayerService
|
||||
from shared.widgets.custom_image import CustomImage
|
||||
|
||||
Reference in new issue
Block a user