Skip to content

Commit

Permalink
Feature: introduce "Window Mode" for selecting windows under Hyprland (
Browse files Browse the repository at this point in the history
…#20)

* feat: allow parsing string to rect

* feat: use string as error because of clap

* feat: allow pre-set initial selection as command line option

* feat: allow non-interactive mode with `--auto-capture`

* chore: remove new cli parameters auto-capture and initial-selection

* chore: remove new rect parsings

* feat: introduce new window mode behind feature flag
feat: add hyprland window mode support

* fix: wrong import paths for wgpu_text re-export structures
I couldn't find a reference on the documentation for these imports
existing, but apparently they stopped suddenly. Also I had to bump
wgpu's and wgpu_text's versions

* feat: allow pre-selecting windows
windows can be pre-selected by one the three options:
- being focused
- by cursor position
- by (title, initial title, class, initial class)-matching regex

* feat: allow auto-exiting by capturing image
this requires a cli selection method to have been made

* chore: document the new cli arguments

* refactor: favor trait objects over type aliases
feat: remove feature gates

* chore: remove unused structures

* feat: allow dragging windows' selections border to convert back into rectangle selection

* chore: remove unused nightly feature

* chore: better pattern matching against long enum path

* chore: favor Contains trait over custom `cointains_point`

* chore: prefer tuple over two integers for position

* feat: check for handle changes before picking new window

* feat: reverse hyprland window order
apparently hyprland tends to keep new windows at a higher position in
the array, though that's not always the case

* feat: clear selection on mode change from window to rect

* feat: make mouse-getting part of `CompositorBackend`

* feat: favor window descriptor as universal struct rather than trait

* chore: swap messy match statement for if-else chain

* feat: better guarantee if hyprland is running or not

* fix: regression when trying to move rectangular selection
  • Loading branch information
Syndelis authored Aug 9, 2023
1 parent 2d0c652 commit f5a76dd
Show file tree
Hide file tree
Showing 12 changed files with 1,174 additions and 411 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
result

# nixago: ignore-linked-files
/treefmt.toml
/treefmt.toml

# VS Code user settings
/.vscode/settings.json
Loading

0 comments on commit f5a76dd

Please sign in to comment.