Migrate Hyprland to Lua config, drop dead flake inputs, general cleanup
Hyprland - Switch wayland.windowManager.hyprland to configType = "lua" (Hyprland 0.56) - Convert settings, env, monitors, window rules, gesture, animations (hl.curve/hl.animation) and all keybinds to hl.* calls - Add home/system/hyprland/lib.nix with exec/bind/execOnce helpers; every exec-once now runs from a hyprland.start hook - Drop hard-coded default_monitor = "eDP-2" Flake - Remove blog, awesome-wallpapers and default-creds inputs (their repos no longer ship a flake.nix and broke `nix flake update`), along with the server modules and Glance links that used them - Update flake.lock - Replace removed `gcr` with `gcr_4` Fixes - Point configDirectory at /etc/nixos/nixy on home-pc and thinkpad - Fix home-pc git email typo - Remove conflicting openpgp signing format, make pull.rebase a boolean, replace hx/peco in git aliases with nvim/sk - Fix zsh NUL alias (2>&1) and stop forcing bat colors in the cat alias - Require a password for sudo again (nixos-rebuild stays NOPASSWD) - Remove duplicate hardware.graphics block from home-pc flake - Delete unused zen .old files, run alejandra on host files
This commit is contained in:
@@ -1,52 +1,67 @@
|
||||
{config, ...}: let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
animationSpeed = config.theme.animation-speed;
|
||||
|
||||
animationDuration =
|
||||
if animationSpeed == "slow"
|
||||
then "4"
|
||||
then 4
|
||||
else if animationSpeed == "medium"
|
||||
then "2.5"
|
||||
else "1.5";
|
||||
then 2.5
|
||||
else 1.5;
|
||||
borderDuration =
|
||||
if animationSpeed == "slow"
|
||||
then "10"
|
||||
then 10
|
||||
else if animationSpeed == "medium"
|
||||
then "6"
|
||||
else "3";
|
||||
then 6
|
||||
else 3;
|
||||
bezier = points: {
|
||||
type = "bezier";
|
||||
inherit points;
|
||||
};
|
||||
curves = {
|
||||
linear = [[0 0] [1 1]];
|
||||
md3_standard = [[0.2 0] [0 1]];
|
||||
md3_decel = [[0.05 0.7] [0.1 1]];
|
||||
md3_accel = [[0.3 0] [0.8 0.15]];
|
||||
overshot = [[0.05 0.9] [0.1 1.1]];
|
||||
crazyshot = [[0.1 1.5] [0.76 0.92]];
|
||||
hyprnostretch = [[0.05 0.9] [0.1 1.0]];
|
||||
menu_decel = [[0.1 1] [0 1]];
|
||||
menu_accel = [[0.38 0.04] [1 0.07]];
|
||||
easeInOutCirc = [[0.85 0] [0.15 1]];
|
||||
easeOutCirc = [[0 0.55] [0.45 1]];
|
||||
easeOutExpo = [[0.16 1] [0.3 1]];
|
||||
softAcDecel = [[0.26 0.26] [0.15 1]];
|
||||
md2 = [[0.4 0] [0.2 1]];
|
||||
};
|
||||
|
||||
anim = leaf: speed: bezier: extra:
|
||||
{
|
||||
inherit leaf speed bezier;
|
||||
enabled = true;
|
||||
}
|
||||
// extra;
|
||||
in {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"linear, 0, 0, 1, 1"
|
||||
"md3_standard, 0.2, 0, 0, 1"
|
||||
"md3_decel, 0.05, 0.7, 0.1, 1"
|
||||
"md3_accel, 0.3, 0, 0.8, 0.15"
|
||||
"overshot, 0.05, 0.9, 0.1, 1.1"
|
||||
"crazyshot, 0.1, 1.5, 0.76, 0.92"
|
||||
"hyprnostretch, 0.05, 0.9, 0.1, 1.0"
|
||||
"menu_decel, 0.1, 1, 0, 1"
|
||||
"menu_accel, 0.38, 0.04, 1, 0.07"
|
||||
"easeInOutCirc, 0.85, 0, 0.15, 1"
|
||||
"easeOutCirc, 0, 0.55, 0.45, 1"
|
||||
"easeOutExpo, 0.16, 1, 0.3, 1"
|
||||
"softAcDecel, 0.26, 0.26, 0.15, 1"
|
||||
"md2, 0.4, 0, 0.2, 1"
|
||||
];
|
||||
config.animations.enabled = true;
|
||||
|
||||
animation = [
|
||||
"windows, 1, ${animationDuration}, md3_decel, popin 60%"
|
||||
"windowsIn, 1, ${animationDuration}, md3_decel, popin 60%"
|
||||
"windowsOut, 1, ${animationDuration}, md3_accel, popin 60%"
|
||||
"border, 1, ${borderDuration}, default"
|
||||
"fade, 1, ${animationDuration}, md3_decel"
|
||||
"layersIn, 1, ${animationDuration}, menu_decel, slide"
|
||||
"layersOut, 1, ${animationDuration}, menu_accel"
|
||||
"fadeLayersIn, 1, ${animationDuration}, menu_decel"
|
||||
"fadeLayersOut, 1, ${animationDuration}, menu_accel"
|
||||
"workspaces, 1, ${animationDuration}, menu_decel, slide"
|
||||
"specialWorkspace, 1, ${animationDuration}, md3_decel, slidevert"
|
||||
];
|
||||
};
|
||||
curve = lib.mapAttrsToList (name: points: {_args = [name (bezier points)];}) curves;
|
||||
|
||||
animation = [
|
||||
(anim "windows" animationDuration "md3_decel" {style = "popin 60%";})
|
||||
(anim "windowsIn" animationDuration "md3_decel" {style = "popin 60%";})
|
||||
(anim "windowsOut" animationDuration "md3_accel" {style = "popin 60%";})
|
||||
(anim "border" borderDuration "default" {})
|
||||
(anim "fade" animationDuration "md3_decel" {})
|
||||
(anim "layersIn" animationDuration "menu_decel" {style = "slide";})
|
||||
(anim "layersOut" animationDuration "menu_accel" {})
|
||||
(anim "fadeLayersIn" animationDuration "menu_decel" {})
|
||||
(anim "fadeLayersOut" animationDuration "menu_accel" {})
|
||||
(anim "workspaces" animationDuration "menu_decel" {style = "slide";})
|
||||
(anim "specialWorkspace" animationDuration "md3_decel" {style = "slidevert";})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user