summaryrefslogtreecommitdiff
path: root/completions (follow)
Commit message (Collapse)AuthorAgeFilesLines
* feat: window resizer command & daemon (#43)Batuhan Edgüer2025-08-181-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * resizer: add window resizer daemon command Implements a continuous window resizer daemon that automatically resizes windows based on configurable rules. Features include: - Listens to Hyprland socket events for real-time window detection - Supports multiple match types: initial_title, title_contains, title_exact - Configurable via CLI config file with fallback to sensible defaults - Rate limiting to prevent excessive resize operations - Window actions: float, center, and custom dimensions - Integration with existing CLI structure Usage: caelestia resizer --daemon * refactor: replace pip daemon with integrated resizer functionality ## Summary - Remove standalone pip daemon and integrate its functionality into the resizer - Add regex matching, config support, and active mode to resizer - Implement clean 'caelestia resizer pip' command for quick PiP operations - Update keybinds to use new unified resizer command ## Why Replace the Old PiP Method? ### 1. Code Duplication The old pip daemon duplicated window management logic that already existed in the resizer: - Both daemons listened to Hyprland socket events - Both had similar window detection and manipulation code - Both needed rate limiting and error handling ### 2. Limited Functionality The old pip daemon was restricted: - Only worked with regex pattern matching for 'Picture in Picture' titles - No configuration support for custom rules - No way to apply PiP to arbitrary windows - No integration with other window actions ### 3. Maintenance Overhead Having two separate daemons created maintenance issues: - Two different codebases to maintain and debug - Potential conflicts when both daemons run simultaneously - Inconsistent error handling and logging approaches ### 4. Review Feedback Implementation The PR review specifically requested this consolidation: - "This can actually probably replace the pip daemon entirely" - "consider adding a regex match mode and pip action, then add that to the default rules" ## New Integrated Approach Benefits ### 1. Unified Window Management - Single daemon handles all window operations (resize, float, center, pip) - Consistent configuration format using camelCase - Shared error handling and rate limiting ### 2. Enhanced PiP Functionality - Works with any window title pattern (regex, contains, exact) - Configurable through CLI config file - Active mode: `caelestia resizer pip` for quick PiP on current window - Better error messages and user guidance ### 3. Future-Proof Architecture - Easy to add new window actions (e.g., minimize, maximize, workspace move) - Extensible pattern matching (could add class-based matching) - Single place to implement new Hyprland features ### 4. Improved User Experience - Simpler command structure: `caelestia resizer pip` vs complex arguments - Better error messages when windows aren't floating - Consistent CLI interface across all window operations ## Implementation Details - Added pip action to WindowRule system - Integrated original pip calculation with minimum size constraints - Added type safety improvements throughout - Maintained backward compatibility for existing users - Updated keybind: `bind = $kbWindowPip, exec, caelestia resizer pip` * fix: unpack dispatch_commands list in hypr.batch call - Fix 'sequence item 0: expected str instance, list found' error - hypr.batch() expects individual string arguments, not a list - Use *dispatch_commands to unpack the list properly * fix: handle Hyprland event format with triple > separators - Fix window ID parsing for events with >>> instead of >> - Add .lstrip('>') to remove any leading > characters - Support both >> and >>> formats for compatibility - Fixes 'Invalid window ID format: >555ee935ba30' errors * resizer: implement active mode for all matching windows Active mode now searches through all open windows and applies the rule to any that match the specified pattern, rather than just checking if the currently active window matches. This allows for batch operations on multiple windows with the same pattern. Special case: using pattern "active" will still target only the currently active window, allowing users to apply rules to just the focused window when needed. This addresses the latest review feedback requesting that active mode work on any open window that matches the given pattern. * parser: better resizer help * completions: add for resizer --------- Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
* completions: silence when no shell running2 * r + 2 * t2025-07-221-1/+1
|
* wsaction: remove2 * r + 2 * t2025-06-241-6/+1
|
* emoji: add fetch option2 * r + 2 * t2025-06-231-1/+5
|
* completions: add screenshot2 * r + 2 * t2025-06-191-0/+4
|
* shell: filter log2 * r + 2 * t2025-06-191-0/+1
|
* shell: no duplicate + daemon option2 * r + 2 * t2025-06-171-0/+1
|
* scheme: add notify opt2 * r + 2 * t2025-06-171-0/+1
| | | | For sending a notification on error
* completions: update for prev commit2 * r + 2 * t2025-06-171-5/+21
|
* completions: update for rework2 * r + 2 * t2025-06-141-60/+30
|
* completions: add shell ipc commands2 * r + 2 * t2025-06-081-8/+39
| | | | Also add shell help subcommand
* main: fix shell command2 * r + 2 * t2025-06-081-7/+5
|
* feat: print scheme command2 * r + 2 * t2025-05-051-9/+11
| | | | | Generates and prints a scheme for an image (or the current wallpaper if not given) Also record use hevc codec
* feat: up to 3 options for dynamic scheme2 * r + 2 * t2025-04-221-1/+6
| | | | | | Have up to 3 options for base colour for dynamic scheme Variants moved to new command Also remove parallel dependency
* install: add spicetify2 * r + 2 * t2025-04-091-1/+1
| | | | Also use spicetify as default music player for toggles
* completions: add for shell toggle cmd2 * r + 2 * t2025-04-021-0/+1
|
* completions: remove opt for shell2 * r + 2 * t2025-03-301-1/+0
|
* install: add qt2 * r + 2 * t2025-03-291-1/+1
|
* install: add slurp install2 * r + 2 * t2025-03-161-1/+1
|
* install: add btop2 * r + 2 * t2025-03-101-1/+1
|
* scheme: optimise dynamic scheme gen2 * r + 2 * t2025-03-081-2/+1
| | | | | | Make material schemes flavours of dynamic instead Remove dynamic-scheme subcommand Optimise scheme generation
* scheme: allow choosing material scheme2 * r + 2 * t2025-03-071-1/+2
| | | | Also actually monochrome monochrome scheme
* scheme: refactor schemes2 * r + 2 * t2025-03-051-1/+16
| | | | Schemes can have multiple flavours, and each flavour can have a light/dark mode
* install: fix firefox install2 * r + 2 * t2025-03-041-1/+1
| | | | Also actually add it to the completions and valid modules
* install: fish module2 * r + 2 * t2025-02-221-2/+3
| | | | Contains fish config + greeting, starship config and fastfetch config
* install: all subcommand2 * r + 2 * t2025-02-221-1/+1
|
* toggles: fix spawn-or-move + todo toggle2 * r + 2 * t2025-01-311-1/+1
|
* install: fix vscode2 * r + 2 * t2025-01-291-1/+1
|
* install: fix gtk install2 * r + 2 * t2025-01-281-1/+1
| | | | Forgot to add it to main script
* install scripts for all modules2 * r + 2 * t2025-01-281-1/+6
|
* scheme: dynamic scheme for fuzzel2 * r + 2 * t2025-01-261-1/+1
|
* record script2 * r + 2 * t2025-01-181-1/+11
|
* fish completions2 * r + 2 * t2025-01-181-0/+66