hypr-cycle
A fast, minimal Rust utility to cycle through workspaces on the currently focused monitor in Hyprland. Unlike hyprctl dispatch workspace e+1, this tool avoids switching workspaces to a different monitor in multi-monitor setups. Unlike hyprctl dispatch focusworkspaceoncurrentmonitor next, this will only switch to workspaces with windows on them.
Features
- Cycles only the workspaces bound to the focused monitor
- Wraps around when reaching the end or beginning
- Fast, clean, and dependency-free
- Written in Rust for performance and reliability
Installation
Arch Linux (via the AUR)
- Clone the repo:
- Make and install
... or just install hypr-cycle via your favorite AUR helper.
From Source
-
Clone the repo:
-
Build and install:
If you want to package this for other distributions, be my guest!
Usage
This will cycle to the next or previous numbered workspace on the monitor that currently has keyboard focus.
Example Hyprland Config
If you want to change workspaces using Mod+Tab and Mod+Shift+Tab, add these bindings to your ~/.config/hypr/hyprland.conf:
bind = $mod, Tab, exec, hypr-cycle next
bind = $mod SHIFT, Tab, exec, hypr-cycle prev
Example Waybar Config
If you want to change workspaces on Waybar using your mouse wheel, add these to your ~/.config/waybar/config.jsonc:
"hyprland/workspaces": {
// ...
"on-scroll-up":"hypr-cycle prev",
"on-scroll-down":"hypr-cycle next",
// ...
},
Dependencies
- Hyprland
- Rust (for building only)
License
MIT license. See LICENSE file.
Contributions
PRs and suggestions welcome! This is a minimal utility, but if you have an idea to make it more powerful or efficient, feel free to open an issue or PR.