Added script + binding to choose beteen scrolling and dwindle

This commit is contained in:
2026-02-27 17:10:43 +01:00
parent 90c010a11d
commit 65e8a338ab
3 changed files with 345 additions and 327 deletions
+321 -315
View File
File diff suppressed because it is too large Load Diff
+12 -6
View File
@@ -2118,19 +2118,21 @@ in
** 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
{ config, lib, pkgs, flakeRoot, ... }:
{ config, lib, pkgs, flakeRoot,...}:
let
# Hyprscrolling drop-in config (repo -> ~/.config)
repoConf = flakeRoot + "/assets/conf/desktop/hypr/hyprscrolling.conf";
targetRel = "hypr/conf.d/90-hyprscrolling.conf";
# Overflow indicator script (repo -> ~/.config)
repoOverflowScript =
flakeRoot + "/assets/conf/desktop/hypr/scripts/hyprscroll-overflow.sh";
repoOverflowScript = flakeRoot + "/assets/conf/desktop/hypr/scripts/hyprscroll-overflow.sh";
targetOverflowRel = "hypr/scripts/hyprscroll-overflow.sh";
repoPerMonitorScript =
flakeRoot + "/assets/conf/desktop/hypr/scripts/hyprscrolling-per-monitor.sh";
# Adapt columnsize to monitor
repoPerMonitorScript = flakeRoot + "/assets/conf/desktop/hypr/scripts/hyprscrolling-per-monitor.sh";
targetPerMonitor = "hypr/scripts/hyprscrolling-per-monitor.sh";
# Facilitate switching between scrolling and dwindle
repoSwitchScript =
flakeRoot + "/assets/conf/desktop/hypr/scripts/toggle-layout-scrolling-dwindle.sh";
targetSwitchScript = "hypr/scripts/toggle-layout-scrolling-dwindle.sh";
in
{
# Ensure deps for the script exist at runtime
@@ -2158,6 +2160,10 @@ in
source = repoPerMonitorScript;
executable = true; # makes it chmod +x
};
xdg.configFile."${targetSwitchScript}" = {
source = repoSwitchScript;
executable = true; # makes it chmod +x
};
}
#+end_src
+12 -6
View File
@@ -1,16 +1,18 @@
{ config, lib, pkgs, flakeRoot, ... }:
{ config, lib, pkgs, flakeRoot,...}:
let
# Hyprscrolling drop-in config (repo -> ~/.config)
repoConf = flakeRoot + "/assets/conf/desktop/hypr/hyprscrolling.conf";
targetRel = "hypr/conf.d/90-hyprscrolling.conf";
# Overflow indicator script (repo -> ~/.config)
repoOverflowScript =
flakeRoot + "/assets/conf/desktop/hypr/scripts/hyprscroll-overflow.sh";
repoOverflowScript = flakeRoot + "/assets/conf/desktop/hypr/scripts/hyprscroll-overflow.sh";
targetOverflowRel = "hypr/scripts/hyprscroll-overflow.sh";
repoPerMonitorScript =
flakeRoot + "/assets/conf/desktop/hypr/scripts/hyprscrolling-per-monitor.sh";
# Adapt columnsize to monitor
repoPerMonitorScript = flakeRoot + "/assets/conf/desktop/hypr/scripts/hyprscrolling-per-monitor.sh";
targetPerMonitor = "hypr/scripts/hyprscrolling-per-monitor.sh";
# Facilitate switching between scrolling and dwindle
repoSwitchScript =
flakeRoot + "/assets/conf/desktop/hypr/scripts/toggle-layout-scrolling-dwindle.sh";
targetSwitchScript = "hypr/scripts/toggle-layout-scrolling-dwindle.sh";
in
{
# Ensure deps for the script exist at runtime
@@ -38,4 +40,8 @@ in
source = repoPerMonitorScript;
executable = true; # makes it chmod +x
};
xdg.configFile."${targetSwitchScript}" = {
source = repoSwitchScript;
executable = true; # makes it chmod +x
};
}