hyprKCS
A fast, lightweight, and graphical keybind manager for Hyprland, built with Rust and GTK4.
Overview
hyprKCS provides a simple and intuitive interface to view, edit, and manage your Hyprland keybinds. It automatically parses your hyprland.conf (and any sourced files), detects conflicts, and allows you to make changes safely.
Features
- Native GTK4 Interface: Integrates seamlessly with your system theme, supporting both light and dark modes via Libadwaita.
- Real-time Fuzzy Search: Instantly find keybinds as you type.
- Advanced Search Syntax: Use tags like
mod:,key:,action:, ordesc:to filter keybinds with precision. - Visual Keyboard Map: Interactive layout to visualize used and available keys for any modifier combination. Supports multiple physical layouts including ANSI, ISO, JIS, ABNT2, or Hungarian.
- Category Filtering: Filter binds by common categories like Workspace, Window, Media, or Custom scripts.
- Conflict Detection: Automatically identifies and highlights duplicate keybinds, resolving Hyprland variables (e.g.,
$mainMod) for accuracy. - Broken Bind Detection: Automatically validates
execandexecrcommands, flagging keybinds that point to missing executables or scripts with a red exclamation mark. - Full Keybind Management: Add, edit, and delete keybinds directly from the UI. Changes are written back to the correct configuration files.
- Configuration Backup: Create a timestamped backup of your configuration files with a single click or set the automatic backup behavior in the settings (it's set to true by default).
- Interactive Restore: Easily browse previous backups and restore your entire configuration tree with a single click.
- Visual Diffs: Compare any backup with your current configuration using a Git-style color-coded diff view before restoring.
- Conflict Resolution Wizard: A guided tool to help resolve duplicate keybinds one by one.
- Smart Autocomplete: Suggests valid Hyprland dispatchers as you type.
- Macro Builder (Chain Actions): Visually create complex keybinds that execute multiple dispatchers in sequence (e.g., move window AND switch workspace).
- Favorites: Pin frequently used keybinds for quick access.
- Input Device Configuration: Manage your
input { ... }block (layout, sensitivity, repeat rate) directly from the settings. - Settings Editor: Configure UI, backup behavior, and appearance directly within the app.
- Automatic Backups: Automatically backup your configuration on every change, with optional retention limits.
- Command-Line Interface: Quickly search and print keybinds from the terminal.
- Keybind Exporting: Export your keybinds to a simple markdown file for easy sharing or documentation.
Installation
From AUR (Arch Linux)
From Crates.io
From Nix
From Source
Ensure you have rust, cargo, and gtk4 development headers installed.
Using Make (Recommended):
Using Cargo directly:
# The binary will be at ./target/release/hyprkcs
Compatibility
| Component | Minimum Version | Notes |
|---|---|---|
| Hyprland | v0.35.0+ | v0.40+ recommended for setprop and newer dispatchers. |
| GTK | 4.12+ | Required for libadwaita and gtk4 features used. |
| Rust | 1.75.0+ | Required to compile dependencies. |
| Linux Distro | Any* | *Must support Wayland and GTK4. |
Configuration
You can customize the appearance and behavior of hyprKCS by creating a configuration file at ~/.config/hyprkcs/hyprkcs.conf. If a value is invalid or omitted, a default will be used.
| Option | Description | Default |
|---|---|---|
width |
Window width (in pixels) | 700 |
height |
Window height (in pixels) | 500 |
opacity |
Window background opacity (0.0 to 1.0) | 1.0 |
fontSize |
Global font size (e.g., 10pt, 1rem) |
0.9rem |
borderSize |
Global border thickness | 1px |
borderRadius |
Main window corner radius | 12px |
showSubmaps |
Toggles visibility of the "Submap" column | false |
showArgs |
Toggles visibility of the "Arguments" column | true |
showFavorites |
Toggles visibility of the "Favorites" column and category | true |
alternatingRowColors |
Toggles striped rows for the list view | true |
defaultSort |
Initial sort column (key, dispatcher, mods, etc.) |
key |
keyboardLayout |
Physical keyboard layout for the visualizer (ANSI, ISO, JIS, ABNT2, HU) |
ANSI |
shadowSize |
CSS box-shadow property for the window (none to disable) |
0 4px 24px rgba(0,0,0,0.4) |
monitorMargin |
Margin around the window (in pixels) | 12 |
rowPadding |
Vertical padding between list rows (in pixels) | 2 |
autoBackup |
Automatically backup config on save | true |
maxBackupsEnabled |
Enable limiting the number of backups | false |
maxBackupsCount |
Maximum number of backups to keep | 10 |
showDescription |
Toggles visibility of the "Description" column (parsed comments from config files) | false |
# Window dimensions
width = 1000px
height = 800px
# Appearance
opacity = 0.95
fontSize = 10pt
borderSize = 2px
borderRadius = 10px
alternatingRowColors = true
shadowSize = 0 4px 24px rgba(0,0,0,0.4)
# UI Elements
showSubmaps = false
showArgs = true
showFavorites = true
defaultSort = mods
keyboardLayout = ANSI
showDescription = true
# Behavior
autoBackup = true
maxBackupsEnabled = true
maxBackupsCount = 20
# Spacing
monitorMargin = 20px
rowPadding = 5px
Usage
Graphical Interface
Launch hyprkcs from your application menu or terminal to open the main window.
Keyboard Shortcuts
| Key | Action |
|---|---|
/ |
Focus the search bar |
Enter |
Edit the selected keybind |
Ctrl + f |
Focus the search bar |
Esc |
Clear search or close the window |
Advanced Search Syntax The search bar supports specific tags to filter results:
mod:<value>/mods:<value>: Filter by modifiers (e.g.,mod:super).key:<value>: Filter by key (e.g.,key:return).action:<value>/disp:<value>: Filter by dispatcher/action (e.g.,action:exec).arg:<value>: Filter by arguments (e.g.,arg:volume).desc:<value>: Filter by description (e.g.,desc:screenshot).
Example: mod:super action:exec firefox finds all Super-bound execution commands for Firefox.
Visual Keyboard Map Click the keyboard icon in the top toolbar to open an interactive keyboard layout.
- Select Modifiers: Toggle SUPER, SHIFT, CTRL, or ALT to see which keys are bound to those modifiers.
- Color Coding: Keys bound to actions are highlighted. Hover over them to see the exact dispatcher and arguments.
- Find Free Keys: Easily spot unhighlighted keys to find available shortcuts for your configuration.
- Multiple Layouts: Switch between ANSI, ISO, JIS, ABNT2, or Hungarian layouts in the Settings to match your physical hardware.
Input Configuration Manage your system's input behavior without manual text editing.
- Keyboard Settings: Set your layout code, variant, options, repeat rate, and delay.
- Mouse/Touchpad: Adjust mouse sensitivity and window focus behavior (Follow Mouse).
- Direct Save: Changes are written directly to your
hyprland.confinput block.
Backup and Restore Safely manage your configuration versions.
- Full Tree Backup: Backs up your entire
~/.config/hyprdirectory recursively, preserving folder structures and external scripts. - Interactive Restore: Access the Restore menu from Settings to see all available timestamped backups.
- Visual Diffs: Before restoring, click "View Diff" to see a color-coded comparison (additions/removals) between the backup and your current files.
- One-Click Recovery: Restore your entire setup instantly if a change breaks your workflow.
Command-Line Interface
hyprKCS also includes a CLI for quick lookups and scripting.
- Print all keybinds:
# Short: hyprkcs -p - Search for a keybind:
# Short: hyprkcs -s "firefox" - Advanced search via CLI:
- Use a custom config file:
# Short: hyprkcs -c ~/.config/hypr/custom.conf - System Check:
Check your system environment for compatibility issues:
Troubleshooting
System Compatibility Check
If the application fails to start or keybinds aren't saving, run the doctor command to diagnose your environment:
This tool verifies:
- Config Access: Checks if
hyprland.confis found and writable. - Dependencies: Confirms GTK4/Libadwaita runtime versions.
- Hyprland IPC: Ensures
hyprctlcan communicate with the compositor. - Input Devices: Lists detected keyboards and guesses physical layout (ANSI/ISO).
- Backups: Verifies backup directory permissions.
GPG Key Import Issues
If you encounter errors like gpg: keyserver receive failed when installing from the AUR, you may need to import the required PGP key manually.
Try importing from the Ubuntu keyserver:
Or from OpenPGP:
Contributing
Contributions are welcome. Please see CONTRIBUTING.md for guidelines.
License
This project is licensed under the MIT License. See the LICENSE file for details.