[Hyprland,Eww] Refactors configs so that I can share more between Vega and Altair

This commit is contained in:
2026-06-01 16:54:06 -07:00
parent e078067a5e
commit e936b9da8f
12 changed files with 274 additions and 124 deletions

View File

@@ -1,8 +1,15 @@
{ pkgs, inputs, ... }:
{
pkgs,
inputs,
config,
lib,
...
}:
{
imports = [
../swaylock.nix
./hypridle.nix
../../options/monitors.nix
];
xdg.configFile = {
@@ -11,9 +18,27 @@
recursive = true;
};
"hypr/base.lua" = {
source = ./config/hyprland.lua;
"hypr/monitors.lua" = {
text = lib.concatStrings (
lib.imap0 (
idx:
{ name, value }:
let
offset = idx * 10;
in
lib.concatMapStrings (
i:
let
ws = offset + i;
in
''
hl.workspace_rule({ workspace = ${toString ws}, monitor = "${name}", default_name = "${name}_${toString i}" })
''
) (lib.range 1 10)
) (lib.attrsToList config.hardware.monitors)
);
};
"hypr/config" = {
source = ./config;
recursive = true;
@@ -43,6 +68,7 @@
];
extraConfig = ''
require("monitors")
require("config.hyprland")
'';