Added two scripts for hyprscrolling
This commit is contained in:
+25
-11
@@ -1770,31 +1770,45 @@ in
|
|||||||
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.
|
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
|
#+begin_src nix :tangle home/desktop/hyprscrolling.nix :noweb tangle :mkdirp yes
|
||||||
{ config, lib, pkgs, flakeRoot, ... }:
|
{ config, lib, pkgs, flakeRoot, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
repoConf =
|
# Hyprscrolling drop-in config (repo -> ~/.config)
|
||||||
flakeRoot + "/assets/conf/desktop/hypr/hyprscrolling.conf";
|
repoConf = flakeRoot + "/assets/conf/desktop/hypr/hyprscrolling.conf";
|
||||||
|
|
||||||
targetRel = "hypr/conf.d/90-hyprscrolling.conf";
|
targetRel = "hypr/conf.d/90-hyprscrolling.conf";
|
||||||
|
|
||||||
|
# Overflow indicator script (repo -> ~/.config)
|
||||||
|
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.sh";
|
||||||
|
targetPerMonitor = "hypr/scripts/hyprscrolling-per-monitor.sh";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Make sure Hyprland is managed by Home-Manager
|
# Ensure deps for the script exist at runtime
|
||||||
|
# (hyprctl comes with Hyprland; jq is often not installed by default)
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
jq
|
||||||
|
];
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# Load the plugin
|
|
||||||
plugins = [
|
plugins = [
|
||||||
pkgs.hyprlandPlugins.hyprscrolling
|
pkgs.hyprlandPlugins.hyprscrolling
|
||||||
];
|
];
|
||||||
|
|
||||||
# Source the drop-in config
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
source = ~/.config/${targetRel}
|
source = ~/.config/${targetRel}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
# Copy repo configs/scripts into ~/.config
|
||||||
# Copy your repo config into ~/.config
|
|
||||||
xdg.configFile."${targetRel}".source = repoConf;
|
xdg.configFile."${targetRel}".source = repoConf;
|
||||||
|
|
||||||
|
xdg.configFile."${targetOverflowRel}" = {
|
||||||
|
source = repoOverflowScript;
|
||||||
|
executable = true; # makes it chmod +x
|
||||||
|
};
|
||||||
|
xdg.configFile."${targetPerMonitor}" = {
|
||||||
|
source = repoPerMonitorScript;
|
||||||
|
executable = true; # makes it chmod +x
|
||||||
|
};
|
||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user