added hyprscroller.nix

This commit is contained in:
KaitoTLex 2025-05-27 11:44:46 -07:00
parent 10f377c490
commit 34055eb96b
No known key found for this signature in database
GPG key ID: 8AB934746F475D0B
6 changed files with 237 additions and 182 deletions

View file

@ -3,6 +3,7 @@
config,
lib,
osConfig,
inputs,
...
}:
let
@ -98,139 +99,144 @@ in
hyprland-qtutils
];
wayland.windowManager.hyprland = {
enable = true;
plugins = [
(pkgs.hyprlandPlugins.hyprscroller.overrideAttrs {
version = "0-unstable-2025-03-28";
src = pkgs.fetchFromGitHub {
owner = "dawsers";
repo = "hyprscroller";
rev = "3f86916f3e9a583154b1be0af4e8a1ef1f7435b2";
hash = "sha256-mgYq3vc4JtIzVuAKTWdALOynImYyNZEXh7tiVPvMZg4=";
};
})
];
settings = {
exec-once = [
"hyprctl dispatch workspace 100000"
];
"$mod" = "SUPER";
"$Left" = "H";
"$Right" = "L";
"$Up" = "K";
"$Down" = "J";
env = (
lib.optionals cfg.gtkUseOpenGL [
"GSK_RENDERER,ngl"
]
);
layerrule = [
"blur,rofi"
"ignorezero,rofi"
"animation slide bottom 0.2 0.2 wind,rofi"
"blur,notifications"
"ignorezero,notifications"
"blur,swaync-notification-window"
"animation slide right 0.5 0.5,swaync-control-center"
"animation slide right 0.5 0.5,notifications"
"animation slide right 0.5 0.5,swaync-notification-window"
"ignorezero,swaync-notification-window"
"blur,swaync-control-center"
"ignorezero,swaync-control-center"
"blur,logout_dialog"
];
dwindle = {
pseudotile = "yes";
preserve_split = "yes";
wayland.windowManager.hyprland =
let
hyprscroller = pkgs.callPackage ./pkgs/vendored/hyprscroller.nix {
src = inputs.hyprscroller-src;
version = inputs.hyprscroller-src.lastModified;
};
animations = {
enabled = "yes";
bezier = [
"wind, 0.05, 0.9, 0.1, 1.05"
"winIn, 0.1, 1.1, 0.1, 1.1"
"winOut, 0.3, -0.3, 0, 1"
"liner, 1, 1, 1, 1"
"windup, 0.05, 0.9, 0.1, 1.05"
in
{
enable = true;
plugins = [ hyprscroller ];
settings = {
input.touchpad = lib.mkIf (config.liminalOS.formFactor == "laptop") {
natural_scroll = true;
disable_while_typing = true;
clickfinger_behavior = true;
tap-to-click = false;
scroll_factor = 0.15;
};
exec-once = [
"hyprctl dispatch workspace 100000"
];
animation =
[
"windows, 1, 6, wind, slide"
"windowsIn, 1, 6, winIn, slide"
"windowsOut, 1, 5, winOut, slide"
"windowsMove, 1, 5, wind, slide"
"fade, 1, 10, default"
# "layers, 1, 8, default, slide"
"workspaces, 1, 5, wind, slidefadevert"
"$mod" = "SUPER";
"$Left" = "H";
"$Right" = "L";
"$Up" = "K";
"$Down" = "J";
env = (
lib.optionals cfg.gtkUseOpenGL [
"GSK_RENDERER,ngl"
]
++ (lib.optionals (!osConfig.liminalOS.powersave) [
"border, 1, 1, liner"
"borderangle, 1, 30, liner, loop"
]);
};
general =
let
inherit (config.lib.stylix) colors;
in
{
gaps_in = "3";
gaps_out = "8";
border_size = "2";
# "col.active_border" = pkgs.lib.mkForce "rgba(ca9ee6ff) rgba(f2d5cfff) 45deg";
# "col.inactive_border" = pkgs.lib.mkForce "rgba(b4befecc) rgba(6c7086cc) 45deg";
"col.active_border" = "rgba(${colors.base0A}ff) rgba(${colors.base09}ff) 45deg";
"col.inactive_border" = "rgba(${colors.base01}cc) rgba(${colors.base02}cc) 45deg";
layout = "scroller";
resize_on_border = "true";
);
layerrule = [
"blur,rofi"
"ignorezero,rofi"
"animation slide bottom 0.2 0.2 wind,rofi"
"blur,notifications"
"ignorezero,notifications"
"blur,swaync-notification-window"
"animation slide right 0.5 0.5,swaync-control-center"
"animation slide right 0.5 0.5,notifications"
"animation slide right 0.5 0.5,swaync-notification-window"
"ignorezero,swaync-notification-window"
"blur,swaync-control-center"
"ignorezero,swaync-control-center"
"blur,logout_dialog"
];
dwindle = {
pseudotile = "yes";
preserve_split = "yes";
};
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
};
cursor = {
hide_on_key_press = true;
};
decoration = {
rounding = "10";
dim_special = "0.3";
blur = {
animations = {
enabled = "yes";
size = "6";
passes = "3";
new_optimizations = "on";
ignore_opacity = "on";
xray = "false";
special = true;
bezier = [
"wind, 0.05, 0.9, 0.1, 1.05"
"winIn, 0.1, 1.1, 0.1, 1.1"
"winOut, 0.3, -0.3, 0, 1"
"liner, 1, 1, 1, 1"
"windup, 0.05, 0.9, 0.1, 1.05"
];
animation =
[
"windows, 1, 6, wind, slide"
"windowsIn, 1, 6, winIn, slide"
"windowsOut, 1, 5, winOut, slide"
"windowsMove, 1, 5, wind, slide"
"fade, 1, 10, default"
# "layers, 1, 8, default, slide"
"workspaces, 1, 5, wind, slidefadevert"
]
++ (lib.optionals (!osConfig.liminalOS.powersave) [
"border, 1, 1, liner"
"borderangle, 1, 30, liner, loop"
]);
};
shadow = {
enabled = false;
general =
let
inherit (config.lib.stylix) colors;
in
{
gaps_in = "3";
gaps_out = "8";
border_size = "2";
# "col.active_border" = pkgs.lib.mkForce "rgba(ca9ee6ff) rgba(f2d5cfff) 45deg";
# "col.inactive_border" = pkgs.lib.mkForce "rgba(b4befecc) rgba(6c7086cc) 45deg";
"col.active_border" = "rgba(${colors.base0A}ff) rgba(${colors.base09}ff) 45deg";
"col.inactive_border" = "rgba(${colors.base01}cc) rgba(${colors.base02}cc) 45deg";
layout = "scroller";
resize_on_border = "true";
};
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
};
cursor = {
hide_on_key_press = true;
};
decoration = {
rounding = "10";
dim_special = "0.3";
blur = {
enabled = "yes";
size = "6";
passes = "3";
new_optimizations = "on";
ignore_opacity = "on";
xray = "false";
special = true;
};
shadow = {
enabled = false;
};
};
input = {
sensitivity = "-0.25";
};
plugin.scroller = {
column_widths = "onethird onehalf twothirds one";
column_heights = "onethird onehalf twothirds one";
};
experimental.xx_color_management_v4 = true;
};
input = {
sensitivity = "-0.25";
};
plugin.scroller = {
column_widths = "onethird onehalf twothirds one";
column_heights = "onethird onehalf twothirds one";
};
experimental.xx_color_management_v4 = true;
};
};
wayland.windowManager.hyprland.settings.input.touchpad =
lib.mkIf (config.liminalOS.formFactor == "laptop")
{
natural_scroll = true;
disable_while_typing = true;
clickfinger_behavior = true;
tap-to-click = false;
scroll_factor = 0.15;
};
# wayland.windowManager.hyprland.settings.input.touchpad =
# lib.mkIf (config.liminalOS.formFactor == "laptop")
# {
# natural_scroll = true;
# disable_while_typing = true;
# clickfinger_behavior = true;
# tap-to-click = false;
# scroll_factor = 0.15;
# };
#
assertions = [
{
assertion =