Added script + binding to choose beteen scrolling and dwindle
This commit is contained in:
+321
-315
File diff suppressed because it is too large
Load Diff
+12
-6
@@ -2118,19 +2118,21 @@ in
|
|||||||
** hyprscrolling
|
** 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.
|
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
|
||||||
# Hyprscrolling drop-in config (repo -> ~/.config)
|
# Hyprscrolling drop-in config (repo -> ~/.config)
|
||||||
repoConf = 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)
|
# Overflow indicator script (repo -> ~/.config)
|
||||||
repoOverflowScript =
|
repoOverflowScript = flakeRoot + "/assets/conf/desktop/hypr/scripts/hyprscroll-overflow.sh";
|
||||||
flakeRoot + "/assets/conf/desktop/hypr/scripts/hyprscroll-overflow.sh";
|
|
||||||
targetOverflowRel = "hypr/scripts/hyprscroll-overflow.sh";
|
targetOverflowRel = "hypr/scripts/hyprscroll-overflow.sh";
|
||||||
repoPerMonitorScript =
|
# Adapt columnsize to monitor
|
||||||
flakeRoot + "/assets/conf/desktop/hypr/scripts/hyprscrolling-per-monitor.sh";
|
repoPerMonitorScript = flakeRoot + "/assets/conf/desktop/hypr/scripts/hyprscrolling-per-monitor.sh";
|
||||||
targetPerMonitor = "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
|
in
|
||||||
{
|
{
|
||||||
# Ensure deps for the script exist at runtime
|
# Ensure deps for the script exist at runtime
|
||||||
@@ -2158,6 +2160,10 @@ in
|
|||||||
source = repoPerMonitorScript;
|
source = repoPerMonitorScript;
|
||||||
executable = true; # makes it chmod +x
|
executable = true; # makes it chmod +x
|
||||||
};
|
};
|
||||||
|
xdg.configFile."${targetSwitchScript}" = {
|
||||||
|
source = repoSwitchScript;
|
||||||
|
executable = true; # makes it chmod +x
|
||||||
|
};
|
||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
{ config, lib, pkgs, flakeRoot, ... }:
|
{ config, lib, pkgs, flakeRoot,...}:
|
||||||
let
|
let
|
||||||
# Hyprscrolling drop-in config (repo -> ~/.config)
|
# Hyprscrolling drop-in config (repo -> ~/.config)
|
||||||
repoConf = 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)
|
# Overflow indicator script (repo -> ~/.config)
|
||||||
repoOverflowScript =
|
repoOverflowScript = flakeRoot + "/assets/conf/desktop/hypr/scripts/hyprscroll-overflow.sh";
|
||||||
flakeRoot + "/assets/conf/desktop/hypr/scripts/hyprscroll-overflow.sh";
|
|
||||||
targetOverflowRel = "hypr/scripts/hyprscroll-overflow.sh";
|
targetOverflowRel = "hypr/scripts/hyprscroll-overflow.sh";
|
||||||
repoPerMonitorScript =
|
# Adapt columnsize to monitor
|
||||||
flakeRoot + "/assets/conf/desktop/hypr/scripts/hyprscrolling-per-monitor.sh";
|
repoPerMonitorScript = flakeRoot + "/assets/conf/desktop/hypr/scripts/hyprscrolling-per-monitor.sh";
|
||||||
targetPerMonitor = "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
|
in
|
||||||
{
|
{
|
||||||
# Ensure deps for the script exist at runtime
|
# Ensure deps for the script exist at runtime
|
||||||
@@ -38,4 +40,8 @@ in
|
|||||||
source = repoPerMonitorScript;
|
source = repoPerMonitorScript;
|
||||||
executable = true; # makes it chmod +x
|
executable = true; # makes it chmod +x
|
||||||
};
|
};
|
||||||
|
xdg.configFile."${targetSwitchScript}" = {
|
||||||
|
source = repoSwitchScript;
|
||||||
|
executable = true; # makes it chmod +x
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user