Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: introduce "Window Mode" for selecting windows under Hyprland #20

Merged
merged 26 commits into from
Aug 9, 2023
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7930ff0
feat: allow parsing string to rect
Syndelis Aug 1, 2023
2dfb1fe
feat: use string as error because of clap
Syndelis Aug 1, 2023
9b85665
feat: allow pre-set initial selection as command line option
Syndelis Aug 1, 2023
cd1a9c5
feat: allow non-interactive mode with `--auto-capture`
Syndelis Aug 1, 2023
ed09bc1
chore: remove new cli parameters auto-capture and initial-selection
Syndelis Aug 2, 2023
15ab57e
chore: remove new rect parsings
Syndelis Aug 2, 2023
93dd949
feat: introduce new window mode behind feature flag
Syndelis Aug 2, 2023
996e75f
fix: wrong import paths for wgpu_text re-export structures
Syndelis Aug 2, 2023
98365f4
feat: allow pre-selecting windows
Syndelis Aug 2, 2023
c3ed24c
feat: allow auto-exiting by capturing image
Syndelis Aug 2, 2023
12d533b
chore: document the new cli arguments
Syndelis Aug 2, 2023
c52ba23
refactor: favor trait objects over type aliases
Syndelis Aug 5, 2023
ccf3f80
chore: remove unused structures
Syndelis Aug 5, 2023
c53340d
feat: allow dragging windows' selections border to convert back into …
Syndelis Aug 5, 2023
d2fffc8
chore: remove unused nightly feature
Syndelis Aug 8, 2023
03c5095
chore: better pattern matching against long enum path
Syndelis Aug 8, 2023
45bcc26
chore: favor Contains trait over custom `cointains_point`
Syndelis Aug 8, 2023
f0b0227
chore: prefer tuple over two integers for position
Syndelis Aug 8, 2023
4657999
feat: check for handle changes before picking new window
Syndelis Aug 8, 2023
285c130
feat: reverse hyprland window order
Syndelis Aug 8, 2023
e515381
feat: clear selection on mode change from window to rect
Syndelis Aug 8, 2023
80d3246
feat: make mouse-getting part of `CompositorBackend`
Syndelis Aug 8, 2023
c2ca665
feat: favor window descriptor as universal struct rather than trait
Syndelis Aug 9, 2023
0628de3
chore: swap messy match statement for if-else chain
Syndelis Aug 9, 2023
27400e7
feat: better guarantee if hyprland is running or not
Syndelis Aug 9, 2023
4190bdd
fix: regression when trying to move rectangular selection
Syndelis Aug 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: use string as error because of clap
Syndelis committed Aug 1, 2023
commit 2dfb1fe3425d2c1b959bc0cf561cf0434f2605e8
3 changes: 0 additions & 3 deletions src/errors.rs
Original file line number Diff line number Diff line change
@@ -5,6 +5,3 @@ pub struct NotSlurpStyleError;
// {w}x{h}+{x}+{y}
#[derive(Debug, PartialEq)]
pub struct NotXRectSelStyleError;

#[derive(Debug, PartialEq)]
pub struct UnparseableRectError;
4 changes: 2 additions & 2 deletions src/types.rs
Original file line number Diff line number Diff line change
@@ -338,12 +338,12 @@ impl Rect<i32> {
}

impl FromStr for Rect<i32> {
type Err = UnparseableRectError;
type Err = String;

fn from_str(s: &str) -> Result<Self, Self::Err> {
Self::from_slurp_style(s)
.or(Self::from_xrectsel_style(s))
.map_err(|_| UnparseableRectError)
.map_err(|_| "Impossible to parse rectangle".to_string())
}
}