Expand description
The Rust implementation of Pinnacle’s configuration API.
This library allows you to interface with the Pinnacle compositor and configure various aspects like input and the tag system.
§Configuration
§With the config generation CLI
To create a Rust config using the config generation CLI, run
pinnacle config gen
and step through the interactive generator (be sure to select Rust as the language). This will create the default config in the specified directory.
§Manually
§1. Create a Cargo project
Create a Cargo project in your config directory with cargo init
.
§2. Create pinnacle.toml
pinnacle.toml
is what tells Pinnacle what command is used to start the config.
Create pinnacle.toml
at the root of the cargo project and add the following to it:
run = ["cargo", "run"]
Pinnacle will now use cargo run
to start your config.
§3. Set up dependencies
In your Cargo.toml
, add pinnacle-api
as a dependency:
[dependencies]
pinnacle-api = { git = "https://github.com/pinnacle-comp/pinnacle" }
§4. Set up the main function
In main.rs
, remove the main function and create an async
one. This is where your config
will start from. Then, call the main
macro, which will create a tokio
main function
that will perform the necessary setup and call your async function.
async fn config() {
// Your config here
}
pinnacle_api::main!(config);
§5. Begin crafting your config!
Take a look at the default config or browse the docs to see what you can do.
Re-exports§
pub use tokio;
Modules§
- debug
- Debugging utilities.
- input
- Input management.
- layout
- Layout management.
- output
- Output management.
- pinnacle
- Compositor management.
- process
- Process management.
- render
- Rendering management.
- signal
- Compositor signals.
- snowcap
- Integration with the Snowcap widget system.
- tag
- Tag management.
- util
- Utility types.
- window
- Window management.
Macros§
- batch_
boxed - Batches API calls in different concrete futures.
- batch_
boxed_ async - The async version of
batch_boxed
. - config
- Connects to Pinnacle before calling the provided async function, then blocks until Pinnacle exits.
- main
- Defines the config’s main entry point.
Structs§
- Keysym
- The keyboard symbol, often corresponding to a character.