some more updates
This commit is contained in:
parent
270e52070d
commit
d5ce93f871
2 changed files with 77 additions and 66 deletions
|
|
@ -44,6 +44,7 @@
|
|||
wallpaper = ../../misc/portrait.png;
|
||||
}
|
||||
];
|
||||
bindWorkspaces = "interlaced";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOption mkIf types trivial strings replaceStrings;
|
||||
inherit (builtins) concatStringsSep elem;
|
||||
inherit (lib) mkOption mkIf types trivial strings;
|
||||
inherit (builtins) concatStringsSep elem genList elemAt;
|
||||
cfg = config.horseman.wm.hyprland;
|
||||
homeCfg = config.horseman;
|
||||
keybinding = types.submodule {
|
||||
|
|
@ -158,6 +158,10 @@ in {
|
|||
|
||||
monitors = {
|
||||
defaultMonitor = mkOption {type = types.bool;};
|
||||
bindWorkspaces = mkOption {
|
||||
type = types.enum ["no" "interlaced"];
|
||||
default = "no";
|
||||
};
|
||||
|
||||
displays = mkOption {
|
||||
type = types.listOf (types.submodule {
|
||||
|
|
@ -225,8 +229,6 @@ in {
|
|||
});
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -269,7 +271,7 @@ in {
|
|||
${concatStringsSep "\n" (map (kb: "bind${concatStringsSep "" kb.flags} = ${concatStringsSep " " kb.mods}, ${kb.key}, ${kb.dispatcher}${
|
||||
if (elem "m" kb.flags) # Mouse binds take one argument less
|
||||
then ""
|
||||
else ", ${replaceStrings ["%"] ["%%"] kb.params}"
|
||||
else ", ${kb.params}"
|
||||
}")
|
||||
cfg.config.keybindings.binds)}
|
||||
|
||||
|
|
@ -280,7 +282,7 @@ in {
|
|||
${concatStringsSep "\n" (map (kb: "bind${concatStringsSep "" kb.flags} = ${concatStringsSep " " kb.mods}, ${kb.key}, ${kb.dispatcher}${
|
||||
if (elem "m" kb.flags) # Mouse binds take one argument less
|
||||
then ""
|
||||
else ", ${replaceStrings ["%"] ["%%"] kb.params}"
|
||||
else ", ${kb.params}"
|
||||
}")
|
||||
sm.binds)}
|
||||
|
||||
|
|
@ -330,7 +332,7 @@ in {
|
|||
|
||||
${concatStringsSep "\n " (map (bez: "bezier = ${bez.name}, ${strings.floatToString bez.startX}, ${strings.floatToString bez.startY}, ${strings.floatToString bez.endX}, ${strings.floatToString bez.endY}") cfg.config.animations.beziers)}
|
||||
|
||||
${concatStringsSep "\n " (map (anim: "animation = ${anim.name}, ${toString anim.on}, ${strings.floatToString anim.speed}, ${anim.curve}, ${replaceStrings ["%"] ["%%"] anim.style}") cfg.config.animations.animations)}
|
||||
${concatStringsSep "\n " (map (anim: "animation = ${anim.name}, ${toString anim.on}, ${strings.floatToString anim.speed}, ${anim.curve}, ${anim.style}") cfg.config.animations.animations)}
|
||||
}
|
||||
|
||||
dwindle {
|
||||
|
|
@ -372,11 +374,18 @@ in {
|
|||
else ""
|
||||
}
|
||||
|
||||
${concatStringsSep "\n" (map (wr: "windowrule = " + wr) cfg.config.windowrules)}
|
||||
|
||||
${concatStringsSep "\n" (map (ws: "workspace = " + ws) cfg.config.workspaces)}
|
||||
|
||||
${concatStringsSep "\n" (map (wr: "windowrule = " + replaceStrings ["%"] ["%%"] wr) cfg.config.windowrules)}
|
||||
${
|
||||
concatStringsSep "\n" (
|
||||
if cfg.config.monitors.bindWorkspaces == "interlaced"
|
||||
then (map (x: "workspace = ${toString (x + 1)}, persistent:true, monitor:${(elemAt cfg.config.monitors.displays (x - (2 * (x / 2)))).output}") (genList (x: x) 10))
|
||||
else []
|
||||
)
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.configFile."hypr/hyprlock.conf".text = ''
|
||||
$font = Monospace
|
||||
|
|
@ -436,4 +445,5 @@ in {
|
|||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue