From b9cd147c0efc86388ae60e9d9f2360dc95d2def1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Thu, 25 Apr 2024 22:18:18 +0200 Subject: [PATCH] feat: more cool theming --- modules/home-manager/desktops/hyprland/anyrun.css | 3 ++- modules/home-manager/desktops/hyprland/default.nix | 8 ++++++++ modules/nixos/theming/anyrun.css | 4 ++++ modules/nixos/theming/hyprland.conf | 4 ++++ modules/nixos/theming/matugen.nix | 12 ++++++++++++ 5 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 modules/nixos/theming/anyrun.css create mode 100644 modules/nixos/theming/hyprland.conf diff --git a/modules/home-manager/desktops/hyprland/anyrun.css b/modules/home-manager/desktops/hyprland/anyrun.css index 4785999..fe9c0a6 100644 --- a/modules/home-manager/desktops/hyprland/anyrun.css +++ b/modules/home-manager/desktops/hyprland/anyrun.css @@ -1,3 +1,5 @@ +@import "./theme.css"; + * { font-family: "NotoSans NF"; } @@ -7,7 +9,6 @@ window#window { } box#main { - background: rgba(48, 52, 70, 0.4); box-shadow: 0 0 15px rgba(0, 0, 0, 0.29); border-radius: 24px; } diff --git a/modules/home-manager/desktops/hyprland/default.nix b/modules/home-manager/desktops/hyprland/default.nix index d5ec954..6e4af6e 100644 --- a/modules/home-manager/desktops/hyprland/default.nix +++ b/modules/home-manager/desktops/hyprland/default.nix @@ -13,6 +13,9 @@ enable = true; variables = [ "--all" ]; }; + extraConfig = '' + source=./theme.conf + ''; settings = { env = [ "XDG_SESSION_TYPE,wayland" @@ -29,6 +32,10 @@ general = { layout = "master"; resize_on_border = true; + extend_border_grab_area = 2; + border_size = 2; + gaps_in = 12; + gaps_out = 24; }; master = { orientation = "center"; @@ -91,6 +98,7 @@ "ignorealpha 0.3, anyrun" ]; decoration = { + rounding = 24; drop_shadow = "yes"; shadow_range = 16; "col.shadow" = "rgba(00000044)"; diff --git a/modules/nixos/theming/anyrun.css b/modules/nixos/theming/anyrun.css new file mode 100644 index 0000000..1c73e6e --- /dev/null +++ b/modules/nixos/theming/anyrun.css @@ -0,0 +1,4 @@ +box#main { + background: rgba({{colors.surface.default.red}}, {{colors.surface.default.green}}, {{colors.surface.default.blue}}, 0.4); + color: {{colors.on_surface.default.hex}}; +} diff --git a/modules/nixos/theming/hyprland.conf b/modules/nixos/theming/hyprland.conf new file mode 100644 index 0000000..bc384ed --- /dev/null +++ b/modules/nixos/theming/hyprland.conf @@ -0,0 +1,4 @@ +general { + col.inactive_border = rgba({{colors.surface.default.hex_stripped}}cc) + col.active_border = rgb({{colors.primary.default.hex_stripped}}) +} diff --git a/modules/nixos/theming/matugen.nix b/modules/nixos/theming/matugen.nix index d0ce2bf..e03bc1d 100644 --- a/modules/nixos/theming/matugen.nix +++ b/modules/nixos/theming/matugen.nix @@ -83,6 +83,10 @@ in for i in $(pgrep -u "$USER" -x nvim); do kill -USR1 "$i" done + + if command -v hyprctl &> /dev/null; then + hyprctl reload + fi ''; }) ]; @@ -134,6 +138,14 @@ in input_path = ./nvim.vim; output_path = "${homeCfg.xdg.configHome}/nvim/colors/matugen.vim"; }; + hyprland = { + input_path = ./hyprland.conf; + output_path = "${homeCfg.xdg.configHome}/hypr/theme.conf"; + }; + anyrun = { + input_path = ./anyrun.css; + output_path = "${homeCfg.xdg.configHome}/anyrun/theme.css"; + }; }; }; };