nixos-configs/modules/desktop/environment/home/hyprexpo.nix
matt1432 a9c41069a6
All checks were successful
Discord / discord commits (push) Has been skipped
fix(hypr): load plugins in exec-once
2025-01-22 14:37:09 -05:00

47 lines
1.3 KiB
Nix

self: {
lib,
osConfig,
pkgs,
...
}: let
inherit (self.lib.hypr) mkBind;
inherit (lib) mkBefore mkIf;
cfg = osConfig.roles.desktop;
in {
config = mkIf cfg.enable {
wayland.windowManager.hyprland = {
# FIXME: https://github.com/hyprwm/Hyprland/issues/9131
# plugins = [self.inputs.hyprland-plugins.packages.${pkgs.system}.hyprexpo];
settings = {
exec-once = mkBefore ["hyprctl plugins load ${self.inputs.hyprland-plugins.packages.${pkgs.system}.hyprexpo}/lib/libhyprexpo.so"];
plugin.hyprexpo = {
columns = 3;
gap_size = 5;
bg_col = "rgb(111111)";
workspace_method = "center current"; # [center/first] [workspace] e.g. first 1 or center m+1
enable_gesture = true; # laptop touchpad
gesture_fingers = 3;
gesture_distance = 300; # how far is the "max"
gesture_positive = true; # positive = swipe down. Negative = swipe up.
};
bind = [
(mkBind {
modifier = "ALT";
key = "tab";
dispatcher = "hyprexpo:expo";
command = "toggle"; # can be: toggle, off/disable or on/enable
})
];
};
};
};
# For accurate stack trace
_file = ./hyprexpo.nix;
}