Commit Graph
113 Commits
Author SHA1 Message Date
sankalp 6f2d0bf444 chore: refactor imports and adopt new utils utilities 2026-07-14 18:45:52 +05:45
sankalp 0496100788 feat(spotlight): add Caffeine plugin to inhibit idle/sleep
Uses systemd-inhibit with a pinned sleep process and PID file so
the inhibition survives Spotlight dismiss. Supports on/off and
duration presets (5m/15m/30m/1h) plus free-form parsing.
2026-07-14 13:47:58 +05:45
sankalp 2d22df94ca refactor: drive UI from service signals, drop redundant polling
- bluetooth.py / wifi.py: remove 5s periodic refresh timers; rely on
  service `changed`/`device-added`/`device-removed`/`notify` signals
- expanded_player.py: remove 500ms metadata poll; rely on
  `meta-change`/`artwork-change` signals
- player.py (notch): connect previously dangling `artwork-change` handler
- popup_win.py: silence harmless "nothing connected" warning on destroy()

No behaviour change; eliminates dead timers and log spam.
2026-07-14 13:46:21 +05:45
sankalp 9ff5ebc95c refactor(spotlight): replace raw socket IPC with Fabric Service over DBus
SpotlightWindow now exposed via SpotlightService (fabric Service) on the
session bus (dev.modus.Spotlight /Toggle). On-demand process forwards to
the running instance over DBus instead of a unix socket; still quits on
dismiss. Behaviour unchanged.
2026-07-14 13:02:26 +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 c0a4b1b792 refactor(src/window/dock): improve desktop file search matching logic
Check exact desktop file name first and enhance matching algorithm to prioritize exact matches, compute relevance scores, and return the best match.
2026-07-14 02:36:20 +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 d6efc12ef1 style(switcher): fix trailing whitespace in app-capture C code
Clean up whitespace in app-capture.c and hyprland-toplevel-mapping XML
2026-07-12 20:19:05 +05:45
sankalp b421e39052 refactor(window): cleanup controlcenter and notification imports
Remove unused imports in controlcenter and notification modules
2026-07-12 20:18:10 +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 795e259e16 fix(panel): wire search button to toggle spotlight
- Add on_clicked handler to search button in panel
- Add set_spotlight_toggle() method on Panel
- Connect spotlight.toggle in main.py after both are created
2026-07-12 20:16:23 +05:45
sankalp 3142d70279 refactor(dock): extract DockItem into items.py, remove TYPE_CHECKING
DockItem, DockModel, DockHitTest moved to items.py.
layout.py and animator.py now import directly — no circular deps.
2026-07-12 19:25:06 +05:45
sankalp 980734f465 fix(dock): quote TYPE_CHECKING annotations for runtime safety
DockItem and DockCanvas are only imported under TYPE_CHECKING.
String-annotate their usage so they aren't evaluated at runtime.
2026-07-12 19:21:58 +05:45
sankalp 07d35d8fdf fix(dock): restore TYPE_CHECKING guards to break circular imports
animator.py and layout.py both circular-import from canvas.py.
Restore the TYPE_CHECKING blocks and suppress TC004 globally.
2026-07-12 19:20:24 +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 15e64df428 refactor: consolidate debounce into utils/debounce.py
Move method-specific debounce from functions.py to debounce.py,
keeping both debounce (method) and sync_debounce (general) together.
2026-07-12 19:04:33 +05:45
sankalp c9f3f27e18 refactor: remove occlusion.py wrapper, import check_occlusion from services.modus directly 2026-07-12 18:59:18 +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 4637799e11 feat(src/window/pomodoro): implement Pomodoro timer widget and integrate it into the panel
Add Pomodoro component with UI controls and state management,
modify Panel to instantiate and cache Pomodoro and TodoList widgets,
hook datetime button to toggle Pomodoro and handle right‑click on todo list,
extend destroy logic to cleanly close Pomodoro and Todo instances.
2026-07-12 09:32:47 +05:45
sankalp 8a4508159e feat(src/window): add lockscreen implementation 2026-07-12 05:27:32 +05:45
sankalp 5af4a80d1d refactor: hide window instead of showing when recording starts 2026-07-12 05:02:26 +05:45
sankalp 0ffd620533 feat(src/window/switcher): add live preview toggle and refactor capture loop with invoke_repeater 2026-07-12 04:46:51 +05:45
sankalp 06c0fb7cb7 feat(src/window/switcher/app-capture): expose target size and damage-waiting options in capture_by_handle 2026-07-12 04:46:21 +05:45
sankalp 373d582701 feat(src/window/switcher): add live preview capture and restructure switcher UI 2026-07-12 03:54:18 +05:45
sankalp ce21c075da feat(src/window/switcher/app-capture): add app-capture implementation 2026-07-12 03:53:58 +05:45
sankalp ccfd1aecc1 feat(cache): implement icon theme aware caching for notification icons and cleanup on theme change 2026-07-12 02:44:56 +05:45
sankalp e837f54680 feat(src/window/notification): switch notification icon size to 64x64
Update notification asset handling to use 64x64 icons for consistency and better thumbnail quality.
2026-07-11 22:22:10 +05:45
sankalp 3f9f75d77e refactor(src/window/screencapture): replace direct _do_screenshot with service call 2026-07-09 23:17:17 +05:45
sankalp 1dd99cf79d refactor(src/window): remove unused ApplicationSwitcher component 2026-07-09 22:33:14 +05:45
sankalp 0d83f2a129 refactor: remove unused signal parameters from event handlers 2026-07-09 18:57:19 +05:45
sankalp bd878c88eb feat(src/window/screencapture): hide window before screenshot 2026-07-09 15:32:46 +05:45
sankalp 822a0eadcc feat(src/window/panel): connect fullscreen state change handler
Add handler for fullscreen changes to automatically toggle panel visibility, improving user experience.
2026-07-08 13:22:09 +05:45
sankalp d1e1e68da5 refactor: remove unused UI components and add quit functionality 2026-07-08 13:02:22 +05:45
sankalp 5b8d6a62aa refactor! : drop subprocess usage and centralize brightness service initialization 2026-07-08 12:25:02 +05:45
sankalp f7662f7f5b feat(src/window/screencapture): implement screen capture window with toolbar, tools, and options menu
Added a new window class that integrates with the capture service, provides a toolbar of tool buttons for region, screen, window, and recording modes, includes an options button to toggle settings, and implements save directory selection, delay, cursor, thumbnail, and microphone controls. The implementation follows the existing widget architecture and updates related modules to expose the new functionality.
2026-07-07 14:02:24 +05:45
sankalp a4b38e3b14 fix(src/window/panel/notch): cancel transient indicator so scroll can navigate 2026-07-06 20:52:34 +05:45
sankalp eaaf9645a2 feat(src/window/panel/notch/indicators): add MicrophoneIndicator class and integrate into Notch
Add MicrophoneIndicator to monitor microphone presence and mute state, updating UI via show/hide callbacks.
2026-07-06 20:35:21 +05:45
sankalp 59a80e47ea refactor(src/window/osd/components): remove MicrophoneOSDContainer implementation 2026-07-06 20:35:01 +05:45
sankalp 9c19b7446a refactor: remove microphone osd container 2026-07-06 20:34:44 +05:45
sankalp a30ddc3fb6 refactor(src/window/osd/components): remove deprecated OSD capslock and keyboard layout components 2026-07-06 20:22:51 +05:45
sankalp a74be0ceb2 chore(src/window/launcher/plugins): remove built-in plugins 2026-07-06 19:50:06 +05:45
sankalp 9c74b0f606 refactor(launcher): remove launcher module files 2026-07-06 19:49:49 +05:45
sankalp fced1a0723 feat(src/window/panel): replace hardcoded config path with dynamic toml_file lookup 2026-07-06 17:39:23 +05:45
sankalp 43197521a8 refactor(src/window): replace get_relative_path with toml_file for config path resolution
The imports now use toml_file to load dock.toml and launcher.toml directly, removing the get_relative_path utility and simplifying path handling. This reduces indirect dependencies and clarifies configuration loading.
2026-07-06 17:39:06 +05:45
sankalp 6b7348ea20 refactor(src/window/notification): adjust notification markup handling and UI width constraints
- Escape markup text for summary and body to prevent injection
- Simplify Label creation for body with conditional null check
- Increase max_chars_width for summary and body lines
- Remove wrap and wrap_mode settings
2026-07-06 17:34:30 +05:45
sankalp c2f9ab4070 feat(src/window): add animation constants, layout tweaks and DockItem dataclass; refactor hover and occlusion handling
- introduced LERP_FACTOR, IDLE_THRESHOLD, ANIM_FPS and related layout constants
- added DockItem dataclass with render geometry and scale state
- refactored on_hover_enter/leave to schedule delayed hide with ticket comparison
- updated setup_occlusion_monitoring with typed check_dock_occlusion returning bool
- cleaned up destroy to remove canvas and timer IDs
2026-07-06 17:34:12 +05:45
sankalp 967503d0b7 fix(src/window/panel/notch): fix typo in charging.svg filename 2026-07-06 00:34:26 +05:45
sankalp 56f1a338b7 refactor(src/window/panel/notch): move icons to notch/ path and adjust sizes
Update icon paths to use notch/ prefix and increase size of charging indicator to 24px.
2026-07-05 23:11:38 +05:45