hyprland LUA config

This commit is contained in:
2026-08-03 08:09:38 +02:00
parent b33eeb71b8
commit c71aba5f64
7 changed files with 387 additions and 158 deletions
+88 -37
View File
@@ -7,7 +7,16 @@
lib,
...
}:
with lib; {
with lib; let
mkEnvVar = name: value: {
_args = [
name
value
];
};
in {
imports = [
];
config = mkMerge [
# ── XDG / MIME defaults ──
{
@@ -35,16 +44,6 @@ with lib; {
};
};
};
services.hyprpaper.settings = {
ipc = "on";
preload = ["/home/sascha.koenig/.config/hypr/wallpapers/wallhaven-lmmo8r_2560x1600.png"];
wallpaper = [
"eDP-1,/home/sascha.koenig/.config/hypr/wallpapers/wallhaven-lmmo8r_2560x1600.png"
"DP-8,/home/sascha.koenig/.config/hypr/wallpapers/wallhaven-lmmo8r_2560x1600.png"
"DP-10,/home/sascha.koenig/.config/hypr/wallpapers/wallhaven-lmmo8r_2560x1600.png"
];
};
}
# ── Hyprland monitor layout ──
@@ -52,37 +51,89 @@ with lib; {
wayland.windowManager.hyprland = {
enable = true;
settings = {
workspace = [
"1, monitor:eDP-1, default:true"
"2, monitor:eDP-1"
"3, monitor:DP-8"
"4, monitor:DP-8"
"5, monitor:DP-10"
"6, monitor:DP-10"
];
windowrule = [
"match:class com.obsproject.Studio, workspace 1"
"match:class dev.zed.Zed, workspace 3"
"match:class vivaldi-stable, workspace 4, opacity 1.0"
"match:initial_title 3.basecamp.com_/5996442/, workspace 5, opacity 1.0"
"match:initial_title 3.basecamp.com_/5996442/, tile on"
"match:initial_title teams.microsoft.com_/, workspace 6, opacity 1.0"
"match:initial_title teams.microsoft.com_/, tile on"
"match:initial_title outlook.office.com_/mail/, workspace 6, opacity 1.0"
"match:initial_title outlook.office.com_/mail/, tile on"
];
device = lib.mkForce [
workspace_rule = [
{
name = "keychron-keychron-k7";
kb_layout = "us";
workspace = "1";
monitor = "eDP-1";
default = true;
}
{
name = "keychron-keychron-k7-1";
kb_layout = "us";
workspace = "2";
monitor = "eDP-1";
}
{
name = "keychron-keychron-k7-2";
kb_layout = "us";
workspace = "3";
monitor = "DP-8";
}
{
workspace = "4";
monitor = "DP-8";
}
{
workspace = "5";
monitor = "DP-10";
}
{
workspace = "6";
monitor = "DP-10";
}
{
workspace = "7";
monitor = "DP-10";
}
];
# m3ta-home sets QT_QPA_PLATFORMTHEME to gtk3 globally for Hyprland.
# ksnip crashes with duplicate GDK type registration under that Qt GTK
# platform theme, so use qtct for Qt apps on this host instead.
"env" = mkForce [
(mkEnvVar "XCURSOR_SIZE" "32")
(mkEnvVar "HYPRCURSOR_THEME" "Bibata-Modern-Ice")
(mkEnvVar "WLR_NO_HARDWARE_CURSORS" "1")
(mkEnvVar "XDG_CURRENT_DESKTOP" "Hyprland")
(mkEnvVar "XDG_SESSION_TYPE" "wayland")
(mkEnvVar "XDG_SESSION_DESKTOP" "Hyprland")
(mkEnvVar "XKB_DEFAULT_LAYOUT" "de")
(mkEnvVar "NIXOS_OZONE_WL" "1")
(mkEnvVar "QT_QPA_PLATFORM" "wayland;xcb")
(mkEnvVar "QT_QPA_PLATFORMTHEME" "qt5ct")
(mkEnvVar "QT_QPA_PLATFORMTHEME_QT6" "qt6ct")
];
window_rule = [
{
match.class = "dev.zed.Zed";
workspace = "3";
}
{
match.class = "^(com.obsproject.Studio)$";
workspace = "1";
}
{
match.class = "^(brave-browse)$";
workspace = "4";
opacity = "1.0";
}
{
match.class = "^(vivaldi-stable)$";
workspace = "4";
opacity = "1.0";
}
{
match.initial_title = "3.basecamp.com_/5996442/";
workspace = "5";
opacity = "1.0";
tile = true;
}
{
match.initial_title = "teams.microsoft.com_/";
workspace = "6";
opacity = "1.0";
tile = true;
}
{
match.initial_title = "outlook.office.com_/mail/";
workspace = "6";
opacity = "1.0";
tile = true;
}
];
};