Move sxhkd configuration
All checks were successful
/ check (push) Successful in 1m49s

This commit is contained in:
Oliver Davies 2025-07-27 22:13:55 +01:00
parent 8d7d6115e3
commit 487e116bac
5 changed files with 15 additions and 30 deletions

View file

@ -10,7 +10,6 @@
cli = {
bookmarkthis.enable = true;
node.enable = true;
sxhkd.enable = true;
starship.enable = true;
zsh.enable = true;
};

View file

@ -11,7 +11,6 @@
./redshift.nix
./screenkey.nix
./starship.nix
./sxhkd.nix
./zsh
];
}

View file

@ -0,0 +1,3 @@
{
flake.modules.homeManager.gui.services.sxhkd.enable = true;
}

View file

@ -1,40 +1,21 @@
{ lib, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.features.cli.${service};
service = "sxhkd";
inherit (lib) getExe mkIf mkEnableOption;
in
flake.modules.homeManager.gui =
{ pkgs, ... }:
{
options.features.cli.${service} = {
enable = mkEnableOption "Enable ${service}";
};
config = mkIf cfg.enable {
xsession.enable = true;
services.${service} = {
enable = true;
keybindings = {
services.sxhkd.keybindings = {
"{_, shift +, super +}XF86MonBrightness{Down,Up}" =
"${getExe pkgs.brightnessctl} set {5%-,10%-,10%,+5%,+10%,100%} --quiet";
"${lib.getExe pkgs.brightnessctl} set {5%-,10%-,10%,+5%,+10%,100%} --quiet";
"super + BackSpace" = "/home/opdavies/sysact";
"super + shift + b" = "/etc/profiles/per-user/opdavies/bin/bookmarkthis";
"super + shift + i" =
"${pkgs.xdotool}/bin/xdotool type $(cat ~/.local/share/snippets.txt | grep -v '^#' | grep -v '^$' | sort | dmenu -i -l 50 | cut -d' ' -f1)";
"super + shift + p" = "${getExe pkgs.passmenu-otp} -i";
"super + shift + p" = "${lib.getExe pkgs.passmenu-otp} -i";
"super + x; {1, 2, 3, 4}" = "st {notes, newsboat, nmtui, bluetuith}";
"@F3" = "${getExe pkgs.displayselect}";
"@F3" = "${lib.getExe pkgs.displayselect}";
"@F9" = "/home/opdavies/.local/bin/mounter";
"@F10" = "/home/opdavies/.local/bin/unmounter";
};
};
};
}

3
modules2/xsession.nix Normal file
View file

@ -0,0 +1,3 @@
{
flake.modules.homeManager.gui.xsession.enable = true;
}