This release is action packed so be prepared!
Steps (This order is recommended so lsp doesn't scream at you lol)
- Add the prelude! This new release includes traits!
use hyprland::prelude::*;
- Switch to the
HResult
Result type (hyprland::shared::HResult
) - Update your data fetcher functions to structs
- Update your dispatch functions to structs
- Switch all
String
s to&str
s in your dispatchers - Switch from
Positive
/Negative
Relative
dispatchers to justRelative..
, and signed ints - When using
WorkspaceType::Special
, now include aSome(name: String)
orNone
- Update your keyword calls to new module
- Update start listener calls
- Follow Rustc and Clippy for everything else!
- Changes some integer types
- Switch to new event structs (no longer tuple!)
- Change some types in the data structs, because they changed (Only int types)
- Fix some dispatchers (ex.
ToggleSpecialWorkspace
) - Update active window event, cuz I merged it with activewindowv2
- Update location of
Result
type, cuz I changed it
- EventListener now requires mutable reference to start
Notation Type | Async Notation | Blocking Notation |
---|---|---|
Old notation | asynchronous::get_something() |
blocking::get_something() |
New Notation | Something::get_async().collect() |
Something::get().collect() |
The
.collect()
is required because data fetchers are now iterators!If you are just converting to a
Vec
, USE THE.to_vec()
method instead, this being an iterator is useful if you wanna for example loop over all the workspaces
Notation Type | Async Notation | Blocking Notation |
---|---|---|
Old notation | dispatch() |
dispatch_blocking() |
New Notation | Dispatch::call_async() |
Dispatch::call() |
Notation Type | Async Notation | Blocking Notation |
---|---|---|
Old notation | start_listener() |
start_listener_blocking() |
New Notation | start_listener_async() |
start_listener() |
This has gone through a complete rework, and now is in the keyword
module
Blocking: Keyword::set(key, val)
Asynchronous: Keyword::set_async(key, val)
AKA getoption
Blocking: Keyword::get(key)
Asynchronous: Keyword::get_async(key)