chore(wm): Fix hyprland keybinds

This commit is contained in:
DashieTM 2025-10-10 19:29:14 +02:00
parent db861d807a
commit 2c218306b9
6 changed files with 25 additions and 18 deletions

View file

@ -164,6 +164,8 @@ in {
"vboxusers"
"video"
"audio"
"scanner"
"lp"
];
packages = with pkgs; [
home-manager

View file

@ -1,4 +1,4 @@
{lib, ...}: let
let
browserName = config:
if (builtins.isString config.mods.homePackages.browser)
then config.mods.homePackages.browser
@ -247,8 +247,8 @@ in {
else {}
)
(mkBindWithDesc ["Mod"] "S" "spawn-sh" [''grim -g \"$(slurp)\" - | wl-copy''] "Take Screenshot")
(mkBindWithDesc ["Mod" "Shift"] "S" "spawn-sh" [''grim -g \"$(slurp)\" - | satty -f -''] "Take Screenshot and edit")
(mkBindWithDesc ["Mod"] "S" "spawn-sh" [''grim -g "$(slurp)" - | wl-copy''] "Take Screenshot")
(mkBindWithDesc ["Mod" "Shift"] "S" "spawn-sh" [''grim -g "$(slurp)" - | satty -f -''] "Take Screenshot and edit")
(
if config.mods.scripts.audioControl

View file

@ -6,7 +6,7 @@
pkgs,
...
}: let
defaultWmConf = import ../../../lib/wm.nix {inherit lib;};
defaultWmConf = import ../../../lib/wm.nix;
in {
options.mods.hypr.hyprland = {
enable = lib.mkOption {
@ -137,7 +137,7 @@ in {
if args != []
then (lib.strings.concatStringsSep " " args)
else "";
shouldRepeat = bind: bind ? meta && bind.meta ? hyprland && bind.meta.hyprland ? repeat && bind.meta.hyprland.repeat;
shouldRepeat = bind: bind ? meta && bind.meta ? hyprland && bind.meta.hyprland ? repeat && bind.meta.hyprland.repeat == true;
defaultBinds = cfg:
if cfg.mods.wm.useDefaultBinds
@ -148,7 +148,7 @@ in {
binds = cfg.mods.wm.binds ++ defaultBinds cfg;
in
binds
|> builtins.filter (bind: bind ? command && shouldRepeat bind && !hasInvalidCustomCommand bind)
|> builtins.filter (bind: bind ? command && shouldRepeat bind && !(hasInvalidCustomCommand bind))
|> builtins.map (
bind: "${mkMods bind},${bind.key},${mkCommand bind}"
);
@ -156,7 +156,7 @@ in {
binds = cfg.mods.wm.binds ++ defaultBinds cfg;
in
binds
|> builtins.filter (bind: bind ? command && !(shouldRepeat bind) && !hasInvalidCustomCommand bind)
|> builtins.filter (bind: bind ? command && !(shouldRepeat bind) && !(hasInvalidCustomCommand bind))
|> builtins.map (
bind: "${mkMods bind},${bind.key},${mkCommand bind}"
);
@ -338,13 +338,13 @@ in {
"noanim, selection"
];
workspace = mkDashDefault (mkWorkspace config.mods.wm.workspaces);
monitor = mkDashDefault (mkMonitors config.mods.wm.monitors);
env = mkDashDefault (mkEnv config);
bind = mkDashDefault (mkBinds config);
binde = mkDashDefault (mkEBinds config);
windowrule = mkDashDefault (mkWindowRule config);
exec-once = mkDashDefault (mkAutoStart config);
workspace = mkWorkspace config.mods.wm.workspaces;
monitor = mkMonitors config.mods.wm.monitors;
env = mkEnv config;
bind = mkBinds config;
binde = mkEBinds config;
windowrule = mkWindowRule config;
exec-once = mkAutoStart config;
plugin = config.mods.hypr.hyprland.pluginConfig;
}
config.mods.hypr.hyprland.customConfig

View file

@ -6,7 +6,7 @@
pkgs,
...
}: let
defaultWmConf = import ../../lib/wm.nix {inherit lib;};
defaultWmConf = import ../../lib/wm.nix;
in {
options.mods.niri = {
enable = lib.mkOption {
@ -66,7 +66,10 @@ in {
|> lib.strings.concatStringsSep "";
mkNiriArg = args:
if args != []
then "\"${(lib.strings.concatStringsSep " " args)}\""
then let
concatCommand = lib.strings.concatStringsSep " " args;
validCommand = builtins.replaceStrings [''"''] [''\"''] concatCommand;
in "\"${validCommand}\""
else "";
mkNiriCommand = bind: let
args = bind.args or [];

View file

@ -16,6 +16,10 @@
config = lib.mkIf config.mods.printing.enable (
lib.optionalAttrs (options ? services.printing) {
# Enable CUPS to print documents.
environment.systemPackages = with pkgs; [
simple-scan
];
hardware.sane.enable = true;
services = {
printing = {
enable = true;

View file

@ -44,8 +44,6 @@ in {
qemu = {
package = mkDashDefault pkgs.qemu_kvm;
swtpm.enable = mkDashDefault true;
ovmf.enable = mkDashDefault true;
ovmf.packages = [pkgs.OVMFFull.fd];
};
};
spiceUSBRedirection.enable = mkDashDefault true;