https://github.com/meir/izu
A unified hotkey config based on sxhkd
https://github.com/meir/izu
bspwm hotkeys hyprland linux nixos sxhkd unix
Last synced: 4 months ago
JSON representation
A unified hotkey config based on sxhkd
- Host: GitHub
- URL: https://github.com/meir/izu
- Owner: meir
- Created: 2024-08-30T13:04:00.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-30T09:58:20.000Z (over 1 year ago)
- Last Synced: 2025-03-17T09:04:14.218Z (over 1 year ago)
- Topics: bspwm, hotkeys, hyprland, linux, nixos, sxhkd, unix
- Language: Go
- Homepage:
- Size: 151 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# izu
izu is a unified hotkey config that's made to parse its own config and generate it into any other hotkey config available.
This can thus be used to manage multiple hotkey daemons on different hosts.
The primary reason for this is switching display protocols or window managers on Linux (using NixOS managed config files).
It's inspired by [sxhkd](https://github.com/baskerville/sxhkd) and shares part of the config syntax.
## Usage
```
NAME:
izu - A unified hotkey config based on sxhkd.
USAGE:
izu [global options] command [command options]
COMMANDS:
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--config value, -c value Path to the configuration file
--formatter value, -f value Path to the formatter lua file
--version, -v Print the version (default: false)
--verbose, -V Print verbose output (default: false)
--silent, -S Silent output, does not output any logs or errors unless when panicking (default: false)
--string value, -s value String to parse
--help, -h show help
```
Example:
```
izu --config ./configfile --formatter sway
```
## Supported formatters
- sxhkd (done)
- hyprland (needs improvement)
- sway (needs improvement)
## Examples
For configuration examples look in `./example/`
For formatter examples look in `./pkg/izu/formatters/`
### NixOS Example
In your flake.nix:
```nix
{
inputs = {
# ...
izu.url = "github:meir/izu";
};
}
```
As a new overlay add the following:
```nix
(final: prev: {
izu = izu.packages."${final.system}";
izuGenerate = izu.packages."${final.system}".izuGenerate;
})
```
Then generate your config my overriding the package with your variables like so:
```nix
home.file.".config/sxhkd/sxhkdrc".source = pkgs.izuGenerate.override {
formatter = "sxhkd";
hotkeys = [
''
super + {_,shift +} space
rofi -show {drun,run} &
''
];
};
```
To insert it within an existing file, you'll have to use `readFile` in order to gain the generated content.
## License
MIT