add nix-hyprland
This commit is contained in:
parent
304570fd73
commit
954bf2d4ba
17 changed files with 619 additions and 2779 deletions
|
|
@ -11,217 +11,30 @@
|
|||
|
||||
cfg = config.horseman.wm.hyprland;
|
||||
homeCfg = config.horseman;
|
||||
|
||||
keybinding = types.submodule {
|
||||
options = {
|
||||
flags = mkOption {
|
||||
type = types.listOf (types.enum ["l" "r" "c" "g" "o" "e" "m" "t" "i" "s" "d" "p"]);
|
||||
};
|
||||
|
||||
mods = mkOption {
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
key = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
dispatcher = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
params = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
};
|
||||
submapKeybinding = types.submodule {
|
||||
options = {
|
||||
flags = mkOption {
|
||||
type = types.listOf (types.enum ["l" "r" "c" "g" "o" "e" "m" "t" "i" "s" "d" "p"]);
|
||||
};
|
||||
|
||||
mods = mkOption {
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
key = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
};
|
||||
vec2 = types.submodule {
|
||||
options = {
|
||||
x = mkOption {type = types.int;};
|
||||
y = mkOption {type = types.int;};
|
||||
};
|
||||
};
|
||||
fontWeight = types.enum ["thin" "ultralight" "light" "semilight" "book" "normal" "medium" "semibold" "bold" "ultrabold" "heavy" "ultraheavy"];
|
||||
in {
|
||||
options.horseman.wm.hyprland.config = {
|
||||
execOnce = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
};
|
||||
env = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
};
|
||||
windowrules = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
};
|
||||
workspaces = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
};
|
||||
|
||||
animations = {
|
||||
beziers = mkOption {
|
||||
type = types.listOf (types.submodule {
|
||||
options = {
|
||||
name = mkOption {type = types.str;};
|
||||
startX = mkOption {type = types.number;};
|
||||
startY = mkOption {type = types.number;};
|
||||
endX = mkOption {type = types.number;};
|
||||
endY = mkOption {type = types.number;};
|
||||
};
|
||||
});
|
||||
options.horseman.wm.hyprland.config.waybar = {
|
||||
layout = {
|
||||
horizontal = {
|
||||
left = mkOption {type = types.listOf types.str;};
|
||||
center = mkOption {type = types.listOf types.str;};
|
||||
right = mkOption {type = types.listOf types.str;};
|
||||
};
|
||||
|
||||
animations = mkOption {
|
||||
type = types.listOf (types.submodule {
|
||||
options = {
|
||||
name = mkOption {type = types.str;};
|
||||
on = mkOption {type = types.bool;};
|
||||
speed = mkOption {
|
||||
type = types.number;
|
||||
default = 0;
|
||||
};
|
||||
curve = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
};
|
||||
style = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
});
|
||||
vertical = {
|
||||
left = mkOption {type = types.listOf types.str;};
|
||||
center = mkOption {type = types.listOf types.str;};
|
||||
right = mkOption {type = types.listOf types.str;};
|
||||
};
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = mkOption {type = types.bool;};
|
||||
preserveSplit = mkOption {type = types.bool;};
|
||||
};
|
||||
|
||||
master = {
|
||||
newStatus = mkOption {type = types.enum ["master" "slave" "inherit"];};
|
||||
};
|
||||
|
||||
monitors = {
|
||||
defaultMonitor = mkOption {type = types.bool;};
|
||||
bindWorkspaces = mkOption {
|
||||
type = types.enum ["no" "interlaced"];
|
||||
default = "no";
|
||||
};
|
||||
|
||||
displays = mkOption {
|
||||
type = types.listOf (types.submodule {
|
||||
options = {
|
||||
output = mkOption {type = types.str;};
|
||||
resolution = mkOption {
|
||||
type = types.str;
|
||||
default = "highres";
|
||||
};
|
||||
refreshRate = mkOption {
|
||||
type = types.str;
|
||||
default = "highrr";
|
||||
};
|
||||
x = mkOption {type = types.int;};
|
||||
y = mkOption {type = types.int;};
|
||||
scale = mkOption {
|
||||
type = types.number;
|
||||
default = 1;
|
||||
};
|
||||
transform = mkOption {
|
||||
type = types.enum [0 1 2 3 4 5 6 7];
|
||||
default = 0;
|
||||
};
|
||||
wallpaper = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
};
|
||||
bar = mkOption {
|
||||
type = types.enum ["" "left" "right" "top" "bottom"];
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
keybindings = {
|
||||
binds = mkOption {type = types.listOf keybinding;};
|
||||
|
||||
submaps = mkOption {
|
||||
type = types.listOf (types.submodule {
|
||||
options = {
|
||||
name = mkOption {type = types.str;};
|
||||
enterBind = mkOption {type = submapKeybinding;};
|
||||
exitBind = mkOption {type = submapKeybinding;};
|
||||
binds = mkOption {type = types.listOf keybinding;};
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
sleep = {
|
||||
lockCommand = mkOption {type = types.str;};
|
||||
|
||||
listeners = mkOption {
|
||||
type = types.listOf (types.submodule {
|
||||
options = {
|
||||
timeout = mkOption {type = types.ints.positive;};
|
||||
onTimeout = mkOption {type = types.str;};
|
||||
onResume = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
};
|
||||
ignoreInhibit = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
waybar = {
|
||||
layout = {
|
||||
horizontal = {
|
||||
left = mkOption {type = types.listOf types.str;};
|
||||
center = mkOption {type = types.listOf types.str;};
|
||||
right = mkOption {type = types.listOf types.str;};
|
||||
};
|
||||
vertical = {
|
||||
left = mkOption {type = types.listOf types.str;};
|
||||
center = mkOption {type = types.listOf types.str;};
|
||||
right = mkOption {type = types.listOf types.str;};
|
||||
};
|
||||
};
|
||||
formats = {
|
||||
horizontal = mkOption {
|
||||
type = types.attrs;
|
||||
};
|
||||
vertical = mkOption {
|
||||
type = types.attrs;
|
||||
};
|
||||
};
|
||||
modules = mkOption {
|
||||
formats = {
|
||||
horizontal = mkOption {
|
||||
type = types.attrs;
|
||||
};
|
||||
vertical = mkOption {
|
||||
type = types.attrs;
|
||||
};
|
||||
};
|
||||
modules = mkOption {
|
||||
type = types.attrs;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -229,12 +42,6 @@ in {
|
|||
horseman.dots = {
|
||||
fuzzel.enable = true;
|
||||
waybar.enable = true;
|
||||
hypr = {
|
||||
hyprland.enable = true;
|
||||
hypridle.enable = true;
|
||||
hyprpaper.enable = true;
|
||||
hyprlock.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.${homeCfg.username} = {
|
||||
|
|
@ -248,7 +55,7 @@ in {
|
|||
if (disp.bar == location)
|
||||
then disp.output
|
||||
else null)
|
||||
cfg.config.monitors.displays
|
||||
config.nix-hyprland.monitors.displays
|
||||
)
|
||||
);
|
||||
in {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue