home/hyprland: inherit window and layer rules from vars.nix

This commit is contained in:
Aly Raffauf 2024-07-19 12:01:43 -04:00
parent 1dffe85a57
commit 0d2a2ebc21
2 changed files with 11 additions and 10 deletions

View file

@ -7,22 +7,22 @@
cfg = config.ar.home;
in {
config = lib.mkIf cfg.desktop.hyprland.enable {
wayland.windowManager = {
hyprland.enable = true;
wayland.windowManager.hyprland = {
enable = true;
hyprland.settings = let
settings = let
inherit
(import ./vars.nix {inherit config lib pkgs;})
brightness
defaultApps
defaultWorkspaces
layerRules
layerrule
media
modifier
screenshot
volume
windowManagerBinds
windowRules
windowrulev2
;
inherit (import ./scripts.nix {inherit config lib pkgs;}) clamshell idleD tablet wallpaperD;
@ -30,6 +30,8 @@ in {
# Hyprland desktop utilities
hyprnome = lib.getExe pkgs.hyprnome;
in {
inherit windowrulev2;
animations = {
enabled = true;
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
@ -111,6 +113,7 @@ in {
];
decoration = {
inherit layerrule;
blur = {
enabled = true;
passes = 1;
@ -120,7 +123,6 @@ in {
"col.shadow" = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.shadow}EE)";
dim_special = 0.5;
drop_shadow = true;
layerrule = layerRules;
rounding = 10;
shadow_range = 4;
shadow_render_power = 3;
@ -196,11 +198,10 @@ in {
++ cfg.desktop.hyprland.laptopMonitors
++ cfg.desktop.hyprland.monitors;
windowrulev2 = windowRules;
xwayland.force_zero_scaling = true;
};
hyprland.extraConfig = let
extraConfig = let
inherit
(import ./vars.nix {inherit config lib pkgs;})
defaultWorkspaces

View file

@ -27,7 +27,7 @@ in {
defaultWorkspaces = [1 2 3 4 5 6 7 8 9];
layerRules = [
layerrule = [
"blur, launcher"
"blur, logout_dialog"
"blur, notifications"
@ -74,7 +74,7 @@ in {
l = "r";
};
windowRules = [
windowrulev2 = [
"center(1),class:(.blueman-manager-wrapped)"
"center(1),class:(com.github.wwmm.easyeffects)"
"center(1),class:(pavucontrol)"