Put every variables in top of the file for easy copy to another config

This commit is contained in:
Hadi
2024-10-09 15:12:50 +02:00
parent 55c7c7068a
commit 0bd55fdc10
27 changed files with 298 additions and 301 deletions

View File

@@ -1,21 +1,22 @@
{ config, ... }: {
wayland.windowManager.hyprland.settings = {
animations = let
animationSpeed = config.var.theme.animation-speed;
{ config, ... }:
let
animationSpeed = config.var.theme.animation-speed;
animationDuration = if animationSpeed == "slow" then
"4"
else if animationSpeed == "medium" then
"2.5"
else
"1.5";
borderDuration = if animationSpeed == "slow" then
"10"
else if animationSpeed == "medium" then
"6"
else
"3";
in {
animationDuration = if animationSpeed == "slow" then
"4"
else if animationSpeed == "medium" then
"2.5"
else
"1.5";
borderDuration = if animationSpeed == "slow" then
"10"
else if animationSpeed == "medium" then
"6"
else
"3";
in {
wayland.windowManager.hyprland.settings = {
animations = {
enabled = true;
bezier = [
"linear, 0, 0, 1, 1"

View File

@@ -1,4 +1,15 @@
{ pkgs, config, inputs, ... }: {
{ pkgs, config, inputs, ... }:
let
border-size = config.var.theme.border-size;
gaps-in = config.var.theme.gaps-in;
gaps-out = config.var.theme.gaps-out;
active-opacity = config.var.theme.active-opacity;
inactive-opacity = config.var.theme.inactive-opacity;
rounding = config.var.theme.rounding;
blur = config.var.theme.blur;
keyboardLayout = config.var.keyboardLayout;
in {
imports = [ ./animations.nix ./bindings.nix ];
@@ -78,21 +89,21 @@
general = {
resize_on_border = true;
gaps_in = config.var.theme.gaps-in;
gaps_out = config.var.theme.gaps-out;
border_size = config.var.theme.border-size;
gaps_in = gaps-in;
gaps_out = gaps-out;
border_size = border-size;
border_part_of_window = true;
layout = "master";
};
decoration = {
active_opacity = config.var.theme.active-opacity;
inactive_opacity = config.var.theme.inactive-opacity;
rounding = config.var.theme.rounding;
active_opacity = active-opacity;
inactive_opacity = inactive-opacity;
rounding = rounding;
drop_shadow = true;
shadow_range = 20;
shadow_render_power = 3;
blur = { enabled = if config.var.theme.blur then "true" else "false"; };
blur = { enabled = if blur then "true" else "false"; };
};
master = {
@@ -113,7 +124,7 @@
};
input = {
kb_layout = config.var.keyboardLayout;
kb_layout = keyboardLayout;
kb_options = "caps:escape";
follow_mouse = 1;