Skip to content

add commands for window tiling#281

Open
theryangeary wants to merge 2 commits into
RustCastLabs:masterfrom
theryangeary:tiling
Open

add commands for window tiling#281
theryangeary wants to merge 2 commits into
RustCastLabs:masterfrom
theryangeary:tiling

Conversation

@theryangeary

Copy link
Copy Markdown
Contributor

Another raycast feature I use a lot. This doesn't technically implement every single tiling option from raycast but handles my commonly used ones and the ones I expect get the most use in general. Regardless, it should be easy to add additional tiling options in a future change if desired.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if rather than hard coding left / right we used:
f32 as a "percentage" of the display and make it configurable in the config?

This way theres a few default arrangements, and its customisable

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that a single f32 can get you there (or maybe I'm misunderstanding) but I do think a 4-tuple of (x_start, x_end, y_start, y_end) could. I'm not interested in implementing the configurable part of this but have a draft of changing to the 4-tuple implementation I can push if you're interested.

Comment thread src/commands.rs

// TileWindow is intercepted in the RunFunction handler which has
// access to the frontmost PID; nothing to do here.
Function::TileWindow(_) => {}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mark it with unreachable!() please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants