Refactor sxhkd to its own module
This commit is contained in:
parent
cb01fe8fe7
commit
098e9f4816
3 changed files with 26 additions and 9 deletions
|
@ -24,6 +24,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
ranger.enable = true;
|
ranger.enable = true;
|
||||||
|
sxhkd.enable = true;
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
tmux.enable = true;
|
tmux.enable = true;
|
||||||
|
|
||||||
|
@ -109,13 +110,4 @@
|
||||||
098EE055DAD2B9CB68154C6759DD38292D2273B6
|
098EE055DAD2B9CB68154C6759DD38292D2273B6
|
||||||
1E21B58D69FFEFAD077F152A50FEA938A3413F50
|
1E21B58D69FFEFAD077F152A50FEA938A3413F50
|
||||||
'';
|
'';
|
||||||
|
|
||||||
services.sxhkd = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
keybindings = {
|
|
||||||
"{_,shift + ,super + }XF86MonBrightness{Down,Up}" = "${lib.getExe pkgs.brightnessctl} set {5%-,10%-,10%,+5%,+10%,100%}";
|
|
||||||
"super + x; {1,2,3}" = "st {newsboat,nmtui,bluetuith";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
./ranger.nix
|
./ranger.nix
|
||||||
./scripts
|
./scripts
|
||||||
./starship.nix
|
./starship.nix
|
||||||
|
./sxhkd.nix
|
||||||
./todos.nix
|
./todos.nix
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
./tmux-sessionizer.nix
|
./tmux-sessionizer.nix
|
||||||
|
|
24
modules/home-manager/cli/sxhkd.nix
Normal file
24
modules/home-manager/cli/sxhkd.nix
Normal 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}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue