Refactor sxhkd to its own module

This commit is contained in:
Oliver Davies 2025-05-25 15:11:33 +01:00
parent cb01fe8fe7
commit 098e9f4816
3 changed files with 26 additions and 9 deletions

View file

@ -11,6 +11,7 @@
./ranger.nix
./scripts
./starship.nix
./sxhkd.nix
./todos.nix
./tmux.nix
./tmux-sessionizer.nix

View file

@ -0,0 +1,24 @@
{ config, lib, pkgs, ... }:
let
cfg = config.cli.${service};
service = "sxhkd";
inherit (lib) getExe mkIf mkEnableOption;
in
{
options.cli.${service} = {
enable = mkEnableOption "Enable ${service}";
};
config = mkIf cfg.enable {
services.${service} = {
enable = true;
keybindings = {
"{_,shift + ,super + }XF86MonBrightness{Down,Up}" = "${getExe pkgs.brightnessctl} set {5%-,10%-,10%,+5%,+10%,100%} --quiet";
"super + x; {1,2,3}" = "st {newsboat,nmtui,bluetuith}";
};
};
};
}