From edcde5ae14b7d492fba63ac5a0591957b97fe36a Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sat, 4 May 2024 21:42:33 -0400 Subject: [PATCH] hyprland: use theme module for colors and cursors hyprpaper: use default wallpaper from theme module --- homeManagerModules/desktop/hypr/default.nix | 16 +++++----------- .../desktop/hypr/hyprpaper/default.nix | 8 +++++++- .../desktop/hypr/hyprpaper/hyprpaper.conf | 5 ----- 3 files changed, 12 insertions(+), 17 deletions(-) delete mode 100644 homeManagerModules/desktop/hypr/hyprpaper/hyprpaper.conf diff --git a/homeManagerModules/desktop/hypr/default.nix b/homeManagerModules/desktop/hypr/default.nix index 51126096..db8cc1a6 100644 --- a/homeManagerModules/desktop/hypr/default.nix +++ b/homeManagerModules/desktop/hypr/default.nix @@ -101,7 +101,7 @@ media_prev = "${media} previous"; # Hyprland desktop utilities - bar = pkgs.waybar + "/bin/waybar -s ${config.xdg.configHome}/waybar/hyprland-style.css"; + bar = pkgs.waybar + "/bin/waybar"; launcher = pkgs.fuzzel + "/bin/fuzzel"; notifyd = pkgs.mako + "/bin/mako"; wallpaperd = pkgs.hyprpaper + "/bin/hyprpaper"; @@ -129,12 +129,6 @@ screenshot_screen = "${screenshot} -m output -o ${screenshot_folder}"; screenshot_region = "${screenshot} -m region -o ${screenshot_folder}"; - # Color, themes, scaling - border_primary = "ca9ee6ee"; - border_secondary = "99d1dbee"; - border_inactive = "303446aa"; - drop_shadow = "1a1a1aee"; - cursor_size = "24"; qt_platform_theme = "gtk2"; gdk_scale = "1.5"; in '' @@ -162,7 +156,7 @@ env = GDK_SCALE,${gdk_scale} # Some default env vars. - env = XCURSOR_SIZE,${cursor_size} + env = XCURSOR_SIZE,${toString config.alyraffauf.desktop.theme.cursorTheme.size} env = QT_QPA_PLATFORMTHEME,${qt_platform_theme} # Execute necessary apps @@ -202,8 +196,8 @@ gaps_in = 5 gaps_out = 10 border_size = 2 - col.active_border = rgba(${border_secondary}) rgba(${border_primary}) 45deg - col.inactive_border = rgba(${border_inactive}) + col.active_border = rgba(${lib.strings.removePrefix "#" config.alyraffauf.desktop.theme.colors.secondary}EE) rgba(${lib.strings.removePrefix "#" config.alyraffauf.desktop.theme.colors.primary}EE) 45deg + col.inactive_border = rgba(${lib.strings.removePrefix "#" config.alyraffauf.desktop.theme.colors.inactive}AA) layout = dwindle @@ -220,7 +214,7 @@ drop_shadow = yes shadow_range = 4 shadow_render_power = 3 - col.shadow = rgba(${drop_shadow}) + col.shadow = rgba(${lib.strings.removePrefix "#" config.alyraffauf.desktop.theme.colors.shadow}EE) dim_special = 0.5 diff --git a/homeManagerModules/desktop/hypr/hyprpaper/default.nix b/homeManagerModules/desktop/hypr/hyprpaper/default.nix index f8a151de..2bc8dedf 100644 --- a/homeManagerModules/desktop/hypr/hyprpaper/default.nix +++ b/homeManagerModules/desktop/hypr/hyprpaper/default.nix @@ -15,6 +15,12 @@ # Packages that should be installed to the user profile. home.packages = with pkgs; [hyprpaper]; - xdg.configFile."hypr/hyprpaper.conf".source = ./hyprpaper.conf; + xdg.configFile."hypr/hyprpaper.conf".text = '' + preload = ${config.alyraffauf.desktop.theme.wallpaper} + + wallpaper = ,${config.alyraffauf.desktop.theme.wallpaper} + + splash = false + ''; }; } diff --git a/homeManagerModules/desktop/hypr/hyprpaper/hyprpaper.conf b/homeManagerModules/desktop/hypr/hyprpaper/hyprpaper.conf deleted file mode 100644 index 270b7a56..00000000 --- a/homeManagerModules/desktop/hypr/hyprpaper/hyprpaper.conf +++ /dev/null @@ -1,5 +0,0 @@ -preload = ~/.local/share/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg - -wallpaper = ,~/.local/share/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg - -splash = false \ No newline at end of file