modules/home/desktop/hyprland/default.nix: small refactor
Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
@ -8,7 +8,8 @@
|
|||||||
}: let
|
}: let
|
||||||
cfg = config.desktop.hyprland;
|
cfg = config.desktop.hyprland;
|
||||||
hostname = osConfig.networking.hostName;
|
hostname = osConfig.networking.hostName;
|
||||||
cursor_size = config.stylix.cursor.size;
|
cursorSize = config.stylix.cursor.size;
|
||||||
|
fontName = config.stylix.fonts.sansSerif.name;
|
||||||
inherit (config.lib.stylix) colors;
|
inherit (config.lib.stylix) colors;
|
||||||
keyboard =
|
keyboard =
|
||||||
if hostname == "eldrid"
|
if hostname == "eldrid"
|
||||||
@ -25,8 +26,9 @@ in {
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
stylix.targets.waybar.enable = false;
|
stylix.targets.waybar.enable = false;
|
||||||
stylix.targets.hyprland.enable = false;
|
stylix.targets.hyprland.enable = false;
|
||||||
|
stylix.targets.hyprlock.enable = false;
|
||||||
home.pointerCursor.hyprcursor.enable = true;
|
home.pointerCursor.hyprcursor.enable = true;
|
||||||
home.pointerCursor.hyprcursor.size = cursor_size;
|
home.pointerCursor.hyprcursor.size = cursorSize;
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd = {
|
systemd = {
|
||||||
@ -83,7 +85,7 @@ in {
|
|||||||
"ELECTRON_OZONE_PLATFORM_HINT,auto"
|
"ELECTRON_OZONE_PLATFORM_HINT,auto"
|
||||||
"QT_QPA_PLATFORM,wayland"
|
"QT_QPA_PLATFORM,wayland"
|
||||||
"QT_QPA_PLATFORMTHEME,gtk3"
|
"QT_QPA_PLATFORMTHEME,gtk3"
|
||||||
"XCURSOR_SIZE,${toString cursor_size}"
|
"XCURSORSIZE,${toString cursorSize}"
|
||||||
"GSK_RENDERER,ngl"
|
"GSK_RENDERER,ngl"
|
||||||
];
|
];
|
||||||
decoration = {
|
decoration = {
|
||||||
@ -98,7 +100,7 @@ in {
|
|||||||
rounding = 12;
|
rounding = 12;
|
||||||
};
|
};
|
||||||
misc = {
|
misc = {
|
||||||
font_family = "${config.stylix.fonts.sansSerif.name}";
|
font_family = fontName;
|
||||||
disable_splash_rendering = true;
|
disable_splash_rendering = true;
|
||||||
disable_hyprland_logo = true;
|
disable_hyprland_logo = true;
|
||||||
# vfr = true;
|
# vfr = true;
|
||||||
@ -145,7 +147,7 @@ in {
|
|||||||
rounding = 8;
|
rounding = 8;
|
||||||
text_height = 14;
|
text_height = 14;
|
||||||
text_center = true;
|
text_center = true;
|
||||||
text_font = "${config.stylix.fonts.sansSerif.name}";
|
text_font = fontName;
|
||||||
|
|
||||||
"col.active" = "0xff${colors.base00}";
|
"col.active" = "0xff${colors.base00}";
|
||||||
"col.inactive" = "0xff${colors.base00}";
|
"col.inactive" = "0xff${colors.base00}";
|
||||||
@ -165,7 +167,7 @@ in {
|
|||||||
window_heights = "onethird onehalf twothirds one";
|
window_heights = "onethird onehalf twothirds one";
|
||||||
gesture_scroll_fingers = 3;
|
gesture_scroll_fingers = 3;
|
||||||
gesture_overview_fingers = 3;
|
gesture_overview_fingers = 3;
|
||||||
jump_labels_font = "${config.stylix.fonts.sansSerif.name}";
|
jump_labels_font = fontName;
|
||||||
jump_labels_color = "0xff${colors.base0A}";
|
jump_labels_color = "0xff${colors.base0A}";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -217,7 +219,7 @@ in {
|
|||||||
gradient_rounding = 4;
|
gradient_rounding = 4;
|
||||||
font_size = 14;
|
font_size = 14;
|
||||||
gradients = true;
|
gradients = true;
|
||||||
font_family = "${config.stylix.fonts.sansSerif.name}";
|
font_family = fontName;
|
||||||
"text_color" = "0xff${colors.base00}";
|
"text_color" = "0xff${colors.base00}";
|
||||||
"col.active" = "0xff${colors.base0D}";
|
"col.active" = "0xff${colors.base0D}";
|
||||||
"col.inactive" = "0xff${colors.base03}";
|
"col.inactive" = "0xff${colors.base03}";
|
||||||
@ -701,7 +703,7 @@ in {
|
|||||||
@define-color base0E #${colors.base0E};
|
@define-color base0E #${colors.base0E};
|
||||||
@define-color base0F #${colors.base0F};
|
@define-color base0F #${colors.base0F};
|
||||||
* {
|
* {
|
||||||
font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome;
|
font-family: ${fontName}, FontAwesome;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
}
|
}
|
||||||
@ -1029,7 +1031,6 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
stylix.targets.hyprlock.enable = false;
|
|
||||||
programs.hyprlock = {
|
programs.hyprlock = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
@ -1065,7 +1066,6 @@ in {
|
|||||||
fail_color = "rgb(${colors.base08})";
|
fail_color = "rgb(${colors.base08})";
|
||||||
placeholder_text = "locked...";
|
placeholder_text = "locked...";
|
||||||
fail_text = "wrong";
|
fail_text = "wrong";
|
||||||
#placeholder_text = '\'<span foreground="##cad3f5">Password...</span>'\';
|
|
||||||
shadow_passes = 0;
|
shadow_passes = 0;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
Reference in New Issue
Block a user