Commit Graph
51 Commits
Author SHA1 Message Date
sankalp 6f2d0bf444 chore: refactor imports and adopt new utils utilities 2026-07-14 18:45:52 +05:45
sankalp f72542a231 refactor: log swallowed exceptions across src/
Replace silent swallow-excepts (pass/return/continue) with
logger.warning recording the caught error, preserving behaviour.
2026-07-14 13:02:21 +05:45
sankalp e734c4bbf4 refactor: improve brightness polling and caching via pathlib 2026-07-14 02:35:25 +05:45
sankalp 112f4b1039 refactor(services): convert weather + gamemode to Fabric services
Weather: move networking, caching and scheduling out of the Weather widget
into a WeatherService singleton. Reuse one httpx.Client for the app lifetime,
drop the 4-worker pool and the multi-entry dict caches (single-value fields),
query Nominatim only on location change, remove debounce and the /tmp-style
polling. Widget now observes the `updated` signal and never hits the network.

GameMode: turn the standalone CLI script into a GameModeService (Service
singleton) exposing an `enabled` Property and `changed` signal. Drive Hyprland
via `hyprctl eval hl.config(...)` instead of the deprecated `hyprctl keyword`
batch (rejected under the Lua config in Hyprland 0.55+), read state via
`hl.get_config`, and keep `hyprctl reload` for disable. Fix game-mode state
parsing so unrecognized `hl.get_config` output no longer falsely reports
active. BatteryWidget's GameModeButton now subscribes to the service.

Remove now-unused LOCATION_CACHE_TIMEOUT.
2026-07-14 00:37:52 +05:45
sankalp f3f17bb5fc refactor(services): split screen capture into screenshot + recorder services
Split the monolithic ScreenCapture service into focused Screenshot and
ScreenRecorder services behind a pluggable capture backend.

- Add shared/capture.py: CaptureBackend abstraction + HyprlandCaptureBackend
  (hyprshot/grim/slurp/wf-recorder) and reusable CaptureNotifier
- Add services/screenshot.py and services/screenrecorder.py with Fabric
  properties/signals; recording state kept in memory (no /tmp files)
- Keep services/screencapture.py as a backwards-compatible facade so
  existing widgets and signals keep working
- Resolve monitors via Hyprland IPC helpers in services/modus.py instead of
  spawning `hyprctl monitors -j` per capture
- Implement real window recording (slurp window boxes) and split the
  record-window / record-region UI mappings
- Register screenshot_service / screen_recorder_service singletons
- Remove dead src/utils/inhibit.py duplicate; minor modus.lua quoting fix
2026-07-13 23:52:32 +05:45
sankalp 54ff85ffc9 fix(services/spotlight): improve MPRIS artwork handling and scope keyword searches to single plugin
- mpris: native MediaArt cache lookup, dedupe play/pause emission, safe
  cleanup, artwork polling for already-playing browser players, drop
  os.system seek fallback
- spotlight: scope plugin keyword and detect() matches to a single plugin
  via search_single instead of global search; register clipboard keywords
  (clip/clipboard)
2026-07-13 22:20:19 +05:45
sankalp 66632f0989 refactor(core): rename APP_NAME to 'modus', cleanup shared widgets
- Change APP_NAME from 'modus1' to 'modus' in shared/data.py
- Remove unused flat_scale widget
- Add missing imports in animator and customrevealer
- Delete src/utils/uinput.py (unused)
- Remove unused import in utils/functions.py
2026-07-12 20:18:05 +05:45
sankalp 3a81ab1212 feat(spotlight): add plugin system with core engine and examples
- Plugin API (plugin.py, context.py, result.py)
- Core engine (search.py, manager.py, registry.py, loader.py)
- Built-in plugins: app, calculator, clipboard, emoji, power_menu, query, wallpapers
- Spotlight docs and example plugins
- Spotlight CSS styling
2026-07-12 20:17:34 +05:45
sankalp 01aac24f7e refactor(bluetooth): resolve device icons from GTK icon theme
_check_icon_to_type now queries Gtk.IconTheme for the icon name
(with -symbolic suffix) before falling back to a hardcoded mapping.
_get_icon_for_device simplified since type property now returns
GTK icon names directly.
2026-07-12 19:07:41 +05:45
sankalp 096231bc44 style: enforce consistent codestyle via ruff config and auto-fixes
- Configure ruff: isort, pyupgrade, bugbear, flake8 rules
- Auto-fix import sorting, redundant parens, exception chaining
- Remove from __future__ import annotations (Python 3.13+)
- Convert debug print() to logger calls
- Fix typo applicaiton → application in icon_resolver
- Remove bare returns in animator setters
- Move TYPE_CHECKING imports to runtime where used at runtime
2026-07-12 18:38:13 +05:45
sankalp afd826d0c0 refactor(services): enhance TodoService with callbacks, UUID IDs, and UTF‑8 file handling 2026-07-12 09:33:41 +05:45
sankalp 40b8962232 feat(notifications): increase app icon size to 64x64 and refactor service retrieval 2026-07-12 02:44:15 +05:45
sankalp 6a5f85a10d refactor(services): migrate run_command to Gio.Subprocess in KeyboardLayout and Modus 2026-07-10 10:31:09 +05:45
sankalp 9024cbc9ba feat: replace blocking subprocess calls with Gio.Subprocess async handling 2026-07-09 23:16:58 +05:45
sankalp 84976320f0 feat: add about_to_show and refresh_menu_sync methods to GlobalMenuService and refactor close_window implementation 2026-07-09 22:32:54 +05:45
sankalp 1403c5adc0 refactor(src/services): remove unused properties and methods across service classes 2026-07-09 18:55:36 +05:45
sankalp bb3a92416f refactor(src/services): switch state storage from JSON to TOML for gamemode 2026-07-09 15:45:20 +05:45
sankalp 01dc64498f feat(src/services): refactor KeyboardLayout to use TOML state persistence and improve layout switching
Switch layouts are now stored in TOML, added proper error handling and a static method to trigger switching, replaced JSON handling, updated imports and fixed related services.
2026-07-09 15:32:29 +05:45
sankalp 4dcfaed69e feat(services): add fullscreenChanged signal and property handling
Add @Signal fullscreen_changed(), expose a read‑write fullscreen Property that triggers the signal on change, set its default to False, connect Hyprland’s fullscreen event to update the property, and store it on the service instance.
2026-07-08 13:21:42 +05:45
sankalp 06be28535a refactor: clean up service implementations and remove dead code 2026-07-08 12:24:39 +05:45
sankalp 22528b312a feat(config): add project metadata and dependencies to pyproject.toml and requirements.txt 2026-07-07 14:01:46 +05:45
sankalp 65fdcc6189 refactor(src/services): streamline recording stop and screenshot handling, remove dead code
Simplify stop_recording by removing redundant process kills and file handling
Add guard to prevent reinitialization
Replace exec_shell_command_async with Gio.Subprocess and track pending screenshot
Refactor screenshot method to eliminate multi‑display special case
Clean up conversion logic and remove unused imports
2026-07-06 20:11:17 +05:45
sankalp 9ad25163f0 refactor(src/services): replace get_relative_path with toml_file for loading config 2026-07-06 17:38:09 +05:45
sankalp 754cde0278 feat(src/services): add NumLock service and refactor Battery documentation
Add new NumLock service to monitor NumLock LED state changes.
Refactor Battery service documentation and property cache handling.
Update imports to include NumLock.
2026-07-05 23:04:34 +05:45
sankalp 7057c750fb feat(src/services): add trust management for Bluetooth devices 2026-07-05 22:07:19 +05:45
sankalp a402cf436b refactor(src/services): centralize position polling guard methods
Add guard flag `_pos_polling` and wrapper methods `_start_pos_fabricator` and `_stop_pos_fabricator` to prevent multiple fabricator starts.
Update all calls to use the new wrappers for consistent lifecycle management.
2026-07-05 20:56:13 +05:45
sankalp 089cc2c6cd feat: increase polling intervals for MPRIS status and position fabricators
- Change status fabricator interval from 250ms to 5000ms
- Change position fabricator interval from 1000ms to 2000ms
- Update poll_from and on_changed callbacks to match the new intervals
2026-07-05 00:05:09 +05:45
sankalp 01c193bd8e refactor(src/services): simplify TodoService and remove unused ConfigService stop function
Remove redundant import duplication, replace uuid with os.urandom, rename completion_rate to active, update property decorator, and clean up callback handling. Also removed unused stop_config_service function.
2026-07-04 07:26:44 +05:45
sankalp 89eb8db97b feat(config): switch configuration parsing to TOML and add google_lens support 2026-07-04 06:29:38 +05:45
sankalp ce0746eeb2 refactor: simplify DBus menu service discovery and introspection handling 2026-07-03 22:59:26 +05:45
sankalp 8d40ac1a7f refactor(src/services): simplify menu cache implementation and remove unused imports
- Remove time import and unused typing items
- Streamline cache eviction and hit logic
- Replace sentinel handling with simpler checks
- Fix activation environment command arguments
- Improve logging messages and cache hit reporting
2026-07-03 21:31:41 +05:45
sankalp cd1ac21273 refactor(src/services): improve property caching and simplify DBus property handling
Add internal property cache to reduce DBus round‑trips and streamline signal handling.
It also adjusts proxy flags and error handling for better robustness.
2026-06-25 13:15:00 +05:45
sankalp 65d1e43dc9 feat(src/services): bump version to 0.2.0 and update pinned dependencies
Update pinned dependencies and bump version to reflect the new stable release.
2026-06-25 12:30:22 +05:45
sankalp 0594759fed feat(services): streamline DBus menu caching and notification handling
- Consolidate logger disabling, cache empty menus with TTL, and move name resolution to a dedicated resolver to reduce duplication and improve performance
2026-06-24 12:52:36 +05:45
sankalp 14580b4d68 refactor(service): enhance menu cache handling and emission sequence checks
Use lock to protect cache access, capture sequence for race‑safe idle emission, and check seq against extraction_seq to prevent stale menu updates.
2026-06-24 08:38:17 +05:45
sankalp ab7ac85b80 refactor(src/services): use mutable list[int] for shared node counter in bounded DFS
Avoid resetting the counter per recursion level by using a mutable list; adds clarifying comments about the shared state.
2026-06-23 14:30:49 +05:45
sankalp b4d011d158 feat(src/services): deduplicate in-flight menu extractions
Prevents duplicate background extraction threads for the same WM class PID, avoiding race conditions and unnecessary work.
2026-06-23 14:28:29 +05:45
sankalp d89b392a0e refactor(src): lazy‑load Launcher and refine GlobalMenuService cache invalidation
Prevents premature instance creation and stale empty‑menu cache entries
2026-06-23 14:10:49 +05:45
sankalp 99d35afa36 feat(src/services): capture target pid early and propagate it through extraction pipeline
Add captured PID to logs, DBus client discovery, and fallback path selection to improve consistency and avoid race conditions; use PID inheritance checks for accurate client matching.
2026-06-22 18:57:41 +05:45
sankalp 09d84598cb feat(src/services): add LRU menu cache and thread‑safe extraction sequencing
Prevent stale UI updates and reduce DBus load by caching menus with automatic eviction when limit exceeded
2026-06-22 18:38:07 +05:45
sankalp 96bb00c199 refactor(src/services): refactor DBus menu discovery and pre-warm PID cache
Pre-warm DBus PID cache using a ThreadPoolExecutor to instantly resolve service PIDs, centralize registry locking, and improve robustness and performance.
2026-06-22 17:45:56 +05:45
sankalp 2a15d71c33 feat(globalmenu): got a prototype of working globalmenu for some apps 2026-06-22 15:58:10 +05:45
sankalp 48231b3bc2 feat(src/services): improve error handlingwith detailed logging
Replace silent exception swallowing with explicit logging via logger.error to aid debugging and observability
2026-06-17 05:20:44 +05:45
sankalp 32080ab17f feat(src/services): add bluetooth device proxy and wifi connection logic
Implemented robust BluetoothDevice proxy handling and enhanced Wi‑Fi reconnection with async callbacks and error handling.
2026-06-17 04:51:51 +05:45
sankalp e4d139d541 refactor(src/services): rename MprisPlayer to PlayerService and streamline MPRIS integration
Remove legacy PlayerManager implementation and simplify signal handling for DBus players
2026-06-17 03:17:31 +05:45
sankalp dc150aee81 refactor(src/services): drop unused NetworkClient and simplify network handling
Prevent unused NetworkClient import and remove extensive network code that was blocking release; streamline to only Wifi service and needed helpers.
2026-06-17 02:00:26 +05:45
sankalp 9907acbce2 refactor(src/services): simplify battery.py imports and drop unused gi dependencies
Remove unused gi imports, streamline dependencies, and align with the updated module structure.
2026-06-17 01:49:16 +05:45
sankalp b8d3e74afd feat(src/services): rename BatteryService to Battery and add availability properties
Rename service to Battery, expose availability, charging, discharging properties and simplify interface for clarity
2026-06-17 01:45:24 +05:45
sankalp 244a913d96 feat(src/services): add config persistence, reload handling and notification 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`
2026-05-03 22:06:23 +05:45
sankalp 791400f437 chore(src/services): remove auth service module- Removed legacy authentication service code.
- Cleaned up unused imports and configuration.
2026-05-03 20:20:05 +05:45