Still finding the proper config for hyprscrolling

This commit is contained in:
2026-02-25 14:32:36 +01:00
parent 7d86863426
commit 40f91e92ac
3 changed files with 70 additions and 30 deletions
-1
View File
@@ -1761,7 +1761,6 @@ in
}
#+end_src
** hyprscrolling
This Nix module integrates the hyprscrolling plugin into a Home-Manager managed Hyprland setup in a declarative and reproducible way. It ensures the plugin is installed, optionally switches Hyprland to the scrolling layout, and renders user-defined plugin settings directly into the Hyprland configuration. The goal is to manage the scrolling workspace behavior entirely from Nix instead of maintaining manual edits inside hyprland.conf.
#+begin_src nix :tangle home/desktop/hyprscrolling.nix :noweb tangle :mkdirp yes
@@ -17,6 +17,15 @@ general {
plugin:hyprscrolling {
# Behavior
column_width = 0.5
fullscreen_on_one_column = true
focus_fit_method = 1
follow_focus = true
follow_min_visible = 0.4
# explicit_column_widths = 0.333, 0.5, 0.667, 1.0
direction = right
# --- Core behaviour ---
enable = true
focus_follows_mouse = true
@@ -31,10 +40,10 @@ plugin:hyprscrolling {
indicators = true
# Style of indicators (examples: line, dots, bar)
indicator_style = bar
indicator_style = dots
# Thickness / size
indicator_thickness = 4
indicator_thickness = 10
# Spacing between indicators
indicator_spacing = 6
+59 -27
View File
@@ -1,30 +1,62 @@
{
config,
lib,
pkgs,
...
}:
{
wayland.windowManager.hyprland = {
plugins = [
pkgs.hyprlandPlugins.hyprscrolling
];
# --------------------------------------------------
# Hyprscrolling scrolling layout with indicators
# Managed in repo: assets/conf/desktop/hypr/hyprscrolling.conf
# --------------------------------------------------
extraConfig = lib.mkAfter ''
############################
# Hyprscrolling (scrolling layout)
############################
# Load plugin (.so is symlinked by Nix module)
plugin = /etc/hypr/plugins/libhyprscrolling.so
general {
layout = scrolling
}
# hyprscrolling uses plugin:hyprscrolling
plugin:hyprscrolling {
# examples; tune to taste
# column_width = 0.70
# fullscreen_on_one_column = 1
}
'';
};
# Make scrolling the default layout
general {
layout = scrolling
}
# --------------------------------------------------
# Plugin configuration
# --------------------------------------------------
plugin:hyprscrolling {
# --- Core behaviour ---
enable = true
focus_follows_mouse = true
smooth_scrolling = true
# --- Gaps & spacing ---
gaps_in = 6
gaps_out = 16
# --- Indicators ---
# Show visual indicators for stacked windows
indicators = true
# Style of indicators (examples: line, dots, bar)
indicator_style = bar
# Thickness / size
indicator_thickness = 4
# Spacing between indicators
indicator_spacing = 6
# Offset from window edge
indicator_offset = 8
# Colors (RGBA)
indicator_color_active = rgba(137, 180, 250, 0.9) # blue-ish (Catppuccin style)
indicator_color_inactive = rgba(88, 91, 112, 0.6)
# Position (top, bottom, left, right)
indicator_position = bottom
}
# --------------------------------------------------
# Optional keybinds
# --------------------------------------------------
# Scroll through stack
bind = SUPER, mouse_down, layoutmsg, scroll +1
bind = SUPER, mouse_up, layoutmsg, scroll -1
# Toggle layout manually
bind = SUPER, S, layoutmsg, togglesplit