Init text color on wallpaper

Former-commit-id: c0dfbe8249
This commit is contained in:
Hadi
2025-03-26 15:38:53 +01:00
parent b6cad25714
commit 60d177ba39
4 changed files with 81 additions and 64 deletions

View File

@@ -1,7 +1,7 @@
# Hyprlock is a lockscreen for Hyprland
{ config, lib, ... }:
let
foreground = "rgba(26, 22, 23, 0.70)";
foreground = "rgba(${config.theme.textColorOnWallpaper}ee)";
font = config.stylix.fonts.serif.name;
in {
programs.hyprlock = {

View File

@@ -9,6 +9,7 @@ let
background = "#${config.lib.stylix.colors.base00}";
background-alt = "#${config.lib.stylix.colors.base01}";
foreground = "#${config.lib.stylix.colors.base05}";
foregroundOnWallpaper = "#${config.theme.textColorOnWallpaper}";
font = "${config.stylix.fonts.serif.name}";
fontSize = "${toString config.stylix.fonts.sizes.desktop}";
@@ -146,7 +147,10 @@ in {
+ (if transparentButtons && transparent then "00" else "")}";
"theme.bar.buttons.style" = "default";
"theme.bar.buttons.monochrome" = true;
"theme.bar.buttons.text" = "${foreground}";
"theme.bar.buttons.text" = if transparent && transparentButtons then
"${foregroundOnWallpaper}"
else
"${foreground}";
"theme.bar.buttons.background" =
"${(if transparent then background else background-alt)
+ (if transparentButtons then "00" else "")}";