Skip to content

Rewrite#30

Draft
S4NKALP wants to merge 109 commits intomacosfrom
dev
Draft

Rewrite#30
S4NKALP wants to merge 109 commits intomacosfrom
dev

Conversation

@S4NKALP
Copy link
Copy Markdown
Owner

@S4NKALP S4NKALP commented Mar 23, 2026

This rewrite is still WIP, so things might move a bit slow.

What's included so far:

  • Auto Reload when config.json file changes without restart
  • move to virtual env instead of global installation
  • new osd components
  • Migrate to a uv managed Python virtual environment
  • hide tray items through config.json
  • fix about app showing unknown data
  • depreciate the use of glace-git
  • improve dock
  • update project folder structure
  • improve the control center's player module
  • fix memory leak
  • remove bloat launcher plugins
  • setting app
  • improve styling

… utilities

- Enhancements: Refactored import section to remove unused modules, added explicit parentheses in hash generation for clarity, and updated debug logging messages for cache cleanup.
- Bug Fixes: Ensured consistent encoding of hash inputs and improved error handling in image dimension hashing.
- Style: Applied consistent formatting and spacing throughout the notification module.
Remove unused auth module and associated screenshot/OQR code logic.
Clean up network import statements and unused dependencies.
Minor cleanup in todo service to eliminate trailing whitespace.

New Features
- None

Enhancements
- Refactored network module imports.
- Streamlined todo service by removing dead code.

Bug Fixes
- None
Add explicit pyproject.toml with project metadata, dependency groups, and uv lock configuration.

- New Features
  - Introduce pyproject.toml defining package name, version, description, and runtime dependencies.
  - Declare dependencies in a structured list and development groups.
- Enhancements
  - Consolidate and clean up imports in lock.py and main.py.
  - Replace hard‑coded logger disable entries with targeted fabric module names.
  - Streamline Application initialization by removing unused components.
- Bug Fixes
  - Resolve missing imports that caused NameError.
  - Correct import ordering for static analysis compliance.
  - Align dependency versions with uv.lock for reproducibility.
New Features
- Added `set_process_name` function to set the process name via `prctl`.

Enhancements
- Replaced `loguru` logger import with `fabric.utils.logger` and removed the unused dependency.
- Added explicit imports of `ctypes`, `html`, and `json` for clarity and future use.

Bug Fixes
- No bug fixes included in this change.
Introduce a new config.json, modernize CSS for dock, battery, and about windows, and clean up obsolete styling.

New Features
- Add `config.json` with wallpaper directory, dock position, and UI flags.
- Create `styles/constant.css` for shared color definitions.
- Rename and style `styles/battery.css` with new visual rules.
- Update hover background in `styles/about.css`.

Enhancements
- Remove deprecated dock CSS to simplify the stylesheet.
- Streamline layer window setup and input handling.

Bug Fixes
- Resolve hover styling conflict in about.css.
- Ensure consistent theming across new style files.
The changes introduce a new GioDBusHelper class for D-Bus interactions and expand utils/functions.py with utilities for timeout parsing, cursor hover handling, animated scale widgets, and SVG loading, improving functionality and maintainability.

- New Features
  - Add GioDBusHelper for method calls and signal subscription.
- Enhancements
  - Add parse_timeout_string and replace placeholder set_process_name implementation.
  - Implement AnimatedScale widget and related utilities.
  - Provide svg_file helper with dynamic style updates.
- Bug Fixes
  - None
Migrate import statements to align with updated fabric utilities.

- New Features
- Enhancements
  - Consolidate imports from gi.repository into fabric.utils for cleaner dependency management.
- Bug Fixes
New Features
- Introduce `get_battery_icon_file` to generate battery icons based on percentage and charging state.
- Add fallback Bluetooth control using `rfkill` when Fabric Bluetooth fails.

Enhancements
- Refactor layout management with `_rebuild_layout_from_config` and dynamic indicator instantiation.
- Replace large `EnergyModeButton` class with lightweight utility functions.
- Simplify notification icon updates using `dynamic_file`.

Bug Fixes
- No explicit bug fixes; changes focus on feature additions and refactoring.
- New Features
  - Add Bluetooth and Wi‑Fi icon sets for applet UI.
- Enhancements
  - Introduce scalable SVG assets with color scheme support.
- Bug Fixes
  - None
The about.py module was deprecated and replaced by newer implementations; its removal cleans up dead code.

New Features
- No new feature introduced

Enhancements
- No functional enhancements

Bug Fixes
- No bug fixes
New Features
- Added ModusNoti instance to application initialization.

Enhancements
- Removed outdated corner visibility configuration and unnecessary comments.
- Streamlined import statements for clarity.

Bug Fixes
- No bug fixes included.
Commented out deprecated keybinds and removed an unused layerrule to clean up configuration and avoid accidental triggers.

New Features
-

Enhancements
- Streamlined layerrules and removed unused definitions.

Bug Fixes
- Avoided accidental execution of stale keybinds.
The Deskwidgets module is now imported, instantiated, and integrated into the main application, expanding desktop widget capabilities.

New Features
- Added Deskwidgets import and instantiation.
- Integrated Deskwidgets into the Application instance.

Enhancements
- Removed stale comments and activated the component.

Bug Fixes
- None
… monitoring widgets

New Features
- Introduce WEATHER_GRADIENT_MAP and WEATHER_EMOJI_MAP for condition‑to‑emoji mapping.
- Add SYSTEM_UPDATE_INTERVAL, WEATHER_UPDATE_INTERVAL, CALENDAR_UPDATE_INTERVAL constants and extend cache timeouts.
- Implement CpuInfo and RamInfo widgets with real‑time CPU percentage, temperature, and RAM usage display.

Enhancements
- Extend LOCATION_CACHE_TIMEOUT to 7 days.
- Integrate progress bar updates for CPU and memory usage.
- Organize desktop widget manager with separate top‑left and bottom‑right windows.

Bug Fixes
- None
New Features
- Introduce `debounce` async decorator to delay coroutine execution until a specified delay elapses.
- Add `sync_debounce` wrapper that uses GLib timeout for synchronous functions, supporting immediate execution and repeat counts.
…sure

- Refactor dock update loop to use explicit parentheses and improve readability
- Fix closure capture in OTP plugin action to correctly pass current code
- Remove redundant lambda wrapper in player label binding
- Update logger messages with full exception context
- Adjust imports and naming for consistency across modules
- Minor code style updates and whitespace cleanup
Remove dead code and redundant blank lines, simplify timer interval selection, and ensure proper realization handling. This improves readability and prevents potential runtime issues.

New Features
-

Enhancements
- Refined timer interval calculation for clarity
- Consolidated easing function stubs for consistency

Bug Fixes
- Fixed missing realize handler connection in SlideRevealer
- Eliminated stray blank line that could affect indentation
New Features
- Added styles/main.css aggregating imports and global defaults
- Renamed battery.css → battery-widget.css for widget-specific styling

Enhancements
- Added smooth transitions and hover effects in panel.css
- Improved OSD styling with rounded corners, translucent background, and better spacing
- Updated button margins, paddings, and border‑radius for consistency

Bug Fixes
- Fixed missing border‑radius and spacing in panel buttons
- Corrected workspace button active/urgent styling
New Features
- Introduced OSD functionality integrated into the application.

Enhancements
- Removed unused stylesheet imports from main.css and corrected the stylesheet path to `styles/main.css`.
- Adjusted the lambda in the network service for consistent method invocation.

Bug Fixes
- Ensured `on_access_point_activated` is properly called when the active access point changes.
Remove superfluous whitespace to improve code readability.
- New Features: (none)
- Enhancements: Added constant.css import and removed launcher.css import
- Bug Fixes: Deleted unused #corner and #corner-container CSS rules
…ilities

Introduce a new OSDWindow implementation, expose keyboard layout configuration, and modernize dependency handling and helper utilities.

- **New Features**
  - Added `keyboard_layouts` list (`us`, `np`) to `config.json`
  - Created `OSDWindow` class and updated `main.py` to use it
  - Introduced new service modules (`battery`, `brightness`, `capslock`, `network`, `mpris`, `todo`, `modus`) and expanded `services/__init__.py`
  - Added `CommandResult` and `run_command` helper in `utils/functions.py`

- **Enhancements**
  - Upgraded numerous dependencies to newer versions and switched `fabric` to a git source
  - Replaced bare `except:` with `except Exception:` in `WiFiPasswordDialog`
  - Improved type hints (`NamedTuple`, `TypeVar`) and refactored JSON file helpers
  - Added property notifications for battery percentage, state, and presence

- **Bug Fixes**
  - Fixed incorrect return type annotation in `read_json_file`
  - Corrected tick‑handler logic to avoid double registration
  - Properly notify listeners on battery property changes
  - Ensured proper exception handling and cleanup in utility functions
Enhancements
- Replace bare `except:` with `except Exception:` in multiple modules- Cast step calculation to `int` for consistent type
- Simplify `get_battery_icon_file` to return a string directly
- Use `get_todo_service()` instead of module-level `todo_service` throughout todo widget
- Remove unused `"zen": "zen-browser"` mapping entry

Bug Fixes
- Prevent bare exception swallowing by catching `Exception` explicitly
- Ensure proper cleanup of timer IDs and other resources
- Delete unused modules/osdd components

New Features
- None
- rename `#osd` selectors to `#osd-container` for better encapsulation
- add `min-width: 180px` to the container definition
- update muted styling rules to use `#osd-container.muted` instead of element‑specific classes
- replace deprecated `#brighntess-icons.muted` with `#osd-image.muted`
- clean up stray braces and whitespace in the stylesheet
…up overhead

The import is now performed lazily within load_config to avoid early import errors and unnecessary loading during module initialization.

- Enhancement: Lazy loading of configuration service
- Bug Fix: Prevent ImportError when services.config is unavailable during startup
Add missing icons for caps lock and keyboard layout to enhance settings UI.

New Features
- Add caps-lock-off.svg, caps-lock.svg, and keyboard-layout.svg.
S4NKALP added 5 commits April 10, 2026 17:11
This change adds a mechanism to refresh the todo list dynamically when the underlying service updates, improving UI responsiveness and user experience. It also updates documentation and removes deprecated files.

- New Features:
  - Added `_refresh_todos` method to rebuild the todo list when `get_todo_service().todos` changes.
  - Introduced `TodoListCapture` class for mouse capture handling of the todo list window.
- Enhancements:
  - Updated README with corrected image paths, installation tips, and manual installation commands.
  - Introduced `start.py` to launch the application or lock mode.
  - Removed deprecated `config.json` and `debug_memory.py`.
- Bug Fixes:
  - Fixed lock screen screenshot path in README.
Enhancements
- Deleted legacy Bluetooth icons (bluetooth-clear.svg, bluetooth-off.svg, bluetooth-off-clear.svg)
- Removed Wi‑Fi connecting icon (wifi-connecting.svg)
- Deleted default.png and modus.png placeholders
- Cleaned up unused screenshots and wallpaper images

New Features
- None

Bug Fixes
- None
Introduce helper functions to invoke the primary application and lock entry points, enhancing modularity and testability.

New Features
- run_app(): launches the main application.
- run_lock(): launches the lock module.

Enhancements
- Refactor start.py to isolate command execution logic.
S4NKALP added 24 commits April 10, 2026 17:13
- New Features: None
- Enhancements: None
- Bug Fixes: None
…re to reflect new config locations and removed outdated ignore patterns.

- New Features: Added tracking of config/ files and removed stale asset ignores.
- Enhancements: Regenerated uv.lock with updated dependency versions, including cffi and click.
- Bug Fixes: Eliminated ignore rules that could unintentionally exclude new project files.
- Corrected lock command reference from `uv run lock.py` to `uv run lock` to match the intended executable, fixing documentation error.
- New Features
  - Incremented project version to 0.2.0
- Enhancements
  - Fixed image reference to use src/assets/modus.png
  - Pinned pywayland to exact version 0.4.18
  - Added explicit version constraints for new dependencies
- Bug Fixes
  - None
… `colors.css` file that defined unused theme variables, reducing bundle size and eliminating stale style references.

- New Features: —
- Enhancements: removed unused color definitions
- Bug Fixes: —
…ring results

- Show applications when query is empty
- Schedule search via GLib timeout
- Improves UI responsiveness and correctness
…arsing

The updated regex now matches non‑numeric unit prefixes, and units are normalized before conversion, improving accuracy and preventing mismatches.

- Bug Fixes: Fixed incorrect unit detection that caused failed conversions.
- Enhancements: Added unit cleaning (`converter.clean_type`) to standardize input.
- New Features: None.
- Replace urllib.request with httpx.get to simplify HTTP handling and improve error resilience
- Update docstring to reflect httpx usage- Remove unused json and urllib.request imports
- Streamline header and timeout configuration
Add httpx>=0.28.1 as a new HTTP client dependency.

New Features- Added httpx>=0.28.1 to pyproject.toml and requirements.txt.

Enhancements
- Updated uv.lock to include httpx package metadata.

Bug Fixes
- None.
- New Feature: Replace urllib.request with httpx for fetching artwork URLs, providing timeout and redirect support.
- Enhancement: Added proper HTTP status code handling and early exit on download cancellation.
- Bug Fix: Gracefully handle non‑200 responses and prevent resource leaks during network operations.
…l mapping

Why: Modernize HTTP client usage and expose currency symbols for conversion.

New Features
- Added `CURRENCY_SYMBOLS` mapping from symbols to currency codes.
- Switched all external requests to `httpx` with custom headers and redirects.

Enhancements
- Increased timeout to 10 seconds and enabled `follow_redirects=True`.
- Centralized error handling with explicit status‑code checks.

Bug Fixes
- Added proper exception handling for JSON parsing to avoid silent failures.
- Improved error messages for non‑200 responses.
Removed pyotp, pyzbar, and thefuzz from pyproject.toml and requirements.txt to simplify dependencies.

- Enhancements
  - Cleaned up redundant dependencies.
- Bug Fixes
  - None.
…ntication service code.

- Cleaned up unused imports and configuration.
…ication pruning on config change

Add ability to persist current configuration to disk and trigger reloads, expose set() and save() methods, monitor the config directory for changes, and adjust notification history based on config modifications.

- New Features
  - Implement `save()` method to write config to file and trigger reload
  - Add `set()` method for in‑memory config updates
  - Extend file monitoring to include parent directory
  - Rename `get_all_config` to `get_config_all`
- Enhancements
  - Refine reload logic to correctly capture previous state via `_last_notified_config`
  - Trigger reloads on additional file‑monitor events (CREATED, DELETED)
  - Prune cached notifications according to config changes (`notification_ignored_apps`, `notification_limited_apps_history`)
- Bug Fixes
  - Resolve race condition where reload‑pending flag could be left set
  - Ensure callbacks are notified on every reload request
  - Fix stale comparison of config values in `has_changed`
Remove several default configuration entries that are no longer required, cleaning up dead code and reducing configuration surface.

- Cleanup: drop unused constants
- Maintenance: simplify DEFAULT dict
…figurationAdd a dedicated settings window with full CSS styling and improve UI consistency

- New Settings window implementation with styling and layout
- Updated visibility configuration to use direct configuration keys
- Simplified layer‑shell positioning logic and improved reliability

Enhancements- Refactored MouseCapture geometry calculations for cleaner code
- Integrated size‑allocate handler to maintain input region sync
- Added global About window singleton and improved toggle behavior

Bug Fixes
- Fixed potential index errors in MouseCapture coordinate calculations- Resolved missing imports and path issues for icon assets
… indicators with visibility handling and improve dropdown and config-driven layout logic

The refactor introduces persistent indicator widgets and updates how visibility and layout are managed based on configuration changes.

New Features
- Added BatteryIndicator, NetworkIndicator and BluetoothIndicator as persistent panel children.
- Implemented visibility toggling for each indicator according to configuration and battery presence.
- Added debug prints when an indicator’s visibility changes or a battery is not detected.

Enhancements
- Updated dropdown actions to use `get_about_window()` and `get_settings_window()` for About and System Settings entries.
- Switched layout rebuilding to use `get_config_all()` and now only rebuilds when specific keys actually change.
- Removed manual recreation of indicators; visibility is controlled via `show()`/`set_visible()`.
- Consolidated changed‑key detection and added logging of rebuild reasons.
- Streamlined config key checks to use `config_data.get(..., True)`.

Bug Fixes
- Fixed BatteryIndicator to hide and log when no battery is detected.
- Corrected use of `config_data.get()` with appropriate fallback values.
- Updated layout updates to use `show()` and trigger a resize queue instead of `show_all()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant