hyprland lua

This commit is contained in:
2026-05-29 10:02:38 +09:00
parent 8341ffcfcd
commit b8523d9cc2
8 changed files with 448 additions and 147 deletions
+37 -25
View File
@@ -1,39 +1,51 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
rosePineHyprcursor = pkgs.callPackage ../../home-manager/hyprland/rose-pine-hyprcursor.nix { };
monitorConf = lib.concatMapStrings (m: "monitor = ${m}\n") config.cornflake.greeter.monitors;
hyprGreetConf = pkgs.writeText "hyprland-greetd.conf" ''
toLua = lib.generators.toLua { };
monitorConf = lib.concatMapStrings (
m: "hl.monitor(${toLua m})\n"
) config.cornflake.greeter.monitors;
hyprGreetConf = pkgs.writeText "hyprland-greetd.lua" ''
${monitorConf}
env = HYPRCURSOR_THEME,rose-pine-hyprcursor
env = HYPRCURSOR_SIZE,24
env = XCURSOR_SIZE,24
hl.env("HYPRCURSOR_THEME", "rose-pine-hyprcursor")
hl.env("HYPRCURSOR_SIZE", "24")
hl.env("XCURSOR_SIZE", "24")
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
hl.env("XDG_CURRENT_DESKTOP", "Hyprland")
hl.env("XDG_SESSION_TYPE", "wayland")
hl.env("XDG_SESSION_DESKTOP", "Hyprland")
general {
border_size = 0
}
hl.config({
general = {
border_size = 0,
},
animations = {
enabled = false,
},
misc = {
force_default_wallpaper = false,
disable_hyprland_logo = true,
disable_splash_rendering = true,
},
})
animations {
enabled = false
}
misc {
force_default_wallpaper = false
disable_hyprland_logo = true
disable_splash_rendering = true
}
exec-once = ${config.programs.regreet.package or pkgs.regreet}/bin/regreet; hyprctl dispatch exit
hl.on("hyprland.start", function()
hl.exec_cmd("${
config.programs.regreet.package or pkgs.regreet
}/bin/regreet; hyprctl dispatch exit")
end)
'';
in
{
options.cornflake.greeter.monitors = lib.mkOption {
type = lib.types.listOf lib.types.str;
type = lib.types.listOf lib.types.attrs;
default = [ ];
description = "greetd Hyprland monitor ";
description = "greetd Hyprland Lua monitor ";
};
config = {