hyprland: support lua configType (#2316)
Link: https://github.com/nix-community/stylix/pull/2316 Closes: https://github.com/nix-community/stylix/issues/2315 Reviewed-by: 0xda157 <da157@voidq.com>
This commit is contained in:
parent
e8ea85b4f7
commit
c1456cc4ba
8 changed files with 96 additions and 62 deletions
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -139,11 +139,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1777268161,
|
||||
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
|
||||
"lastModified": 1778869304,
|
||||
"narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
|
||||
"rev": "d233902339c02a9c334e7e593de68855ad26c4cb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
34
flake/dev/flake.lock
generated
34
flake/dev/flake.lock
generated
|
|
@ -2,7 +2,9 @@
|
|||
"nodes": {
|
||||
"dankMaterialShell": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-compat": [
|
||||
"flake-compat"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"dev-nixpkgs"
|
||||
],
|
||||
|
|
@ -44,11 +46,11 @@
|
|||
},
|
||||
"dev-nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1777268161,
|
||||
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
|
||||
"lastModified": 1778869304,
|
||||
"narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
|
||||
"rev": "d233902339c02a9c334e7e593de68855ad26c4cb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -74,22 +76,6 @@
|
|||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1767039857,
|
||||
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
||||
"owner": "NixOS",
|
||||
"repo": "flake-compat",
|
||||
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"locked": {
|
||||
"lastModified": 1767039857,
|
||||
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
||||
|
|
@ -135,11 +121,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1777594677,
|
||||
"narHash": "sha256-h90sHwoRJLRvaTpZroTvU2JRHDFj0czUafM8eqLe1RI=",
|
||||
"lastModified": 1778805320,
|
||||
"narHash": "sha256-nGFJ01m2CTBKD4ABtcY4vLhHrRN91LKr/pn41PcU78A=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "899c08a15beae5da51a5cecd6b2b994777a948da",
|
||||
"rev": "9846abe15e7d0d36b8acbd4d05f2b87461744c92",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -316,7 +302,7 @@
|
|||
"dev-flake-parts": "dev-flake-parts",
|
||||
"dev-nixpkgs": "dev-nixpkgs",
|
||||
"dev-systems": "dev-systems",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-compat": "flake-compat",
|
||||
"git-hooks": "git-hooks",
|
||||
"home-manager": "home-manager",
|
||||
"nixvim": "nixvim",
|
||||
|
|
|
|||
|
|
@ -189,9 +189,6 @@
|
|||
email = "nukdokplex@nukdokplex.ru";
|
||||
github = "nukdokplex";
|
||||
githubId = 25458915;
|
||||
keys = [
|
||||
{ fingerprint = "7CE2 4C42 942D 58EA 99F6 F00A A47E 7374 3EF6 FCC4"; }
|
||||
];
|
||||
name = "Viktor Titov";
|
||||
};
|
||||
omega-800 = {
|
||||
|
|
|
|||
|
|
@ -23,26 +23,32 @@ mkTarget {
|
|||
let
|
||||
rgb = color: "rgb(${color})";
|
||||
rgba = color: alpha: "rgba(${color}${alpha})";
|
||||
in
|
||||
{
|
||||
decoration.shadow.color = rgba colors.base00 "99";
|
||||
general = {
|
||||
"col.active_border" = rgb colors.base0D;
|
||||
"col.inactive_border" = rgb colors.base03;
|
||||
};
|
||||
group = {
|
||||
"col.border_inactive" = rgb colors.base03;
|
||||
"col.border_active" = rgb colors.base0D;
|
||||
"col.border_locked_active" = rgb colors.base0C;
|
||||
colorSettings = {
|
||||
decoration.shadow.color = rgba colors.base00 "99";
|
||||
|
||||
groupbar = {
|
||||
text_color = rgb colors.base05;
|
||||
"col.active" = rgb colors.base0D;
|
||||
"col.inactive" = rgb colors.base03;
|
||||
general = {
|
||||
"col.active_border" = rgb colors.base0D;
|
||||
"col.inactive_border" = rgb colors.base03;
|
||||
};
|
||||
|
||||
group = {
|
||||
"col.border_inactive" = rgb colors.base03;
|
||||
"col.border_active" = rgb colors.base0D;
|
||||
"col.border_locked_active" = rgb colors.base0C;
|
||||
|
||||
groupbar = {
|
||||
text_color = rgb colors.base05;
|
||||
"col.active" = rgb colors.base0D;
|
||||
"col.inactive" = rgb colors.base03;
|
||||
};
|
||||
};
|
||||
misc.background_color = rgb colors.base00;
|
||||
};
|
||||
misc.background_color = rgb colors.base00;
|
||||
};
|
||||
in
|
||||
if config.wayland.windowManager.hyprland.configType == "hyprlang" then
|
||||
colorSettings
|
||||
else
|
||||
{ config = colorSettings; };
|
||||
}
|
||||
)
|
||||
(
|
||||
|
|
@ -51,7 +57,11 @@ mkTarget {
|
|||
{
|
||||
services.hyprpaper.enable = true;
|
||||
stylix.targets.hyprpaper.enable = true;
|
||||
wayland.windowManager.hyprland.settings.misc.disable_hyprland_logo = true;
|
||||
wayland.windowManager.hyprland.settings =
|
||||
if config.wayland.windowManager.hyprland.configType == "hyprlang" then
|
||||
{ misc.disable_hyprland_logo = true; }
|
||||
else
|
||||
{ config.misc.disable_hyprland_logo = true; };
|
||||
}
|
||||
)
|
||||
];
|
||||
|
|
|
|||
12
modules/hyprland/testbeds/hyprland-lua.nix
Normal file
12
modules/hyprland/testbeds/hyprland-lua.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
stylix.testbed.ui = {
|
||||
graphicalEnvironment = "hyprland";
|
||||
|
||||
# We need something to open a window so that we can check the window borders
|
||||
application = {
|
||||
name = "kitty";
|
||||
package = pkgs.kitty;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
stylix.testbed.ui = {
|
||||
graphicalEnvironment = "hyprland";
|
||||
|
|
@ -9,4 +9,10 @@
|
|||
package = pkgs.kitty;
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.sharedModules = lib.singleton {
|
||||
wayland.windowManager.hyprland = {
|
||||
configType = "hyprlang";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
};
|
||||
home.packages = with pkgs; [
|
||||
darkly
|
||||
darkly-qt5
|
||||
utterly-round-plasma-style
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -15,18 +15,42 @@
|
|||
(pkgs.writeShellScriptBin "x-terminal-emulator" ''exec ${lib.getExe pkgs.kitty} "$@"'')
|
||||
];
|
||||
|
||||
home-manager.sharedModules = lib.singleton {
|
||||
programs.kitty.enable = true;
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = {
|
||||
exec-once = "find /run/current-system/sw/etc/xdg/autostart/ -type f -or -type l | xargs -P0 -L1 ${lib.getExe pkgs.dex}";
|
||||
ecosystem = {
|
||||
no_update_news = true;
|
||||
no_donation_nag = true;
|
||||
};
|
||||
home-manager.sharedModules = lib.singleton (
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.kitty.enable = true;
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings =
|
||||
if config.wayland.windowManager.hyprland.configType == "hyprlang" then
|
||||
{
|
||||
exec-once = "find /run/current-system/sw/etc/xdg/autostart/ -type f -or -type l | xargs -P0 -L1 ${lib.getExe pkgs.dex}";
|
||||
ecosystem = {
|
||||
no_update_news = true;
|
||||
no_donation_nag = true;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
on = {
|
||||
_args = [
|
||||
"hyprland.start"
|
||||
(lib.generators.mkLuaInline ''
|
||||
function()
|
||||
hl.exec_cmd("find /run/current-system/sw/etc/xdg/autostart/ -type f -or -type l | xargs -P0 -L1 ${lib.getExe pkgs.dex}")
|
||||
end
|
||||
'')
|
||||
];
|
||||
};
|
||||
config = {
|
||||
ecosystem = {
|
||||
no_update_news = true;
|
||||
no_donation_nag = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue