Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Chunks-rs
A library that simplifies the process of making widgets for Wayland Compositors.
Chunks uses GTK4 and GTK4 Layer Shell at its core, and comes stock with a listener for the Hyprland IPC. This helps with changing Widget states when something changes, such as making the current window fullscreen.
Usage
Make sure you have GTK4 and GTK4-Layer-Shell installed on your system.
For more in depth examples, please refer to example-chunks
[]
= "0.6.5"
This will create a storage widget, similar to the one in the screenshot:
const STYLE: &str = "
window {
background-color: transparent;
}
#storage {
font-size: 34px;
background-color: #000000;
color: #FFFFFF;
}
";
Slabs & Plates
Chunks has two types of Popup widgets:
- Slabs: Display dynamically, triggered by changes in underlying text (e.g., volume detection).
- Plates: Display once at startup, then disappear after a set duration (e.g., welcome messages).
Both share similar implementations but differ in their display behavior.
These widget types do not need a designated layer, as they are set to Overlay by default. Instead of a layer, insert the number (in seconds) that you would like the Slab/Plate to show for.
new
.build;
new
.build;
Bars
Chunks recently added a new widget type - Bars - which are used to display a taskbar, similar to Waybar or Polybar. These taskbars are broken down into a collection of widgets, such as a clock, a workspace switcher, and a system tray.
Bar implementation is similar to the other widgets, but with a few key differences:
- Takes a vector of Tags, which are used to determine a collection of widgets to be displayed on the taskbar.
- Takes an Orientation type (Horizontal or Vertical) to determine the layout of the taskbar.
The switch_workspace function is used to switch workspaces using hyprctl. This is then passed through to your Tag using static_button, which gives your button functionality.
When implementing Tags of the button type, you can use virtually any function in place of switch_workspace.