From d0f36f45646090a23b337c1fa8dbd87640ba1562 Mon Sep 17 00:00:00 2001 From: tux Date: Mon, 23 Jun 2025 15:58:19 +0530 Subject: [PATCH] feat: add and enable hyprexpo plugin --- flake.lock | 31 +++++++++++++++++++++++ flake.nix | 6 ++++- modules/home/desktop/hyprland/default.nix | 22 ++++++++++++++++ overlays/default.nix | 1 + 4 files changed, 59 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 3c89423..dd70ac8 100755 --- a/flake.lock +++ b/flake.lock @@ -571,6 +571,36 @@ "type": "github" } }, + "hyprland-plugins": { + "inputs": { + "hyprland": [ + "hyprland" + ], + "nixpkgs": [ + "hyprland-plugins", + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland-plugins", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1750503578, + "narHash": "sha256-/qnR7/GvGP1cGtOOm4OGJRtkVejn75/jsvJpiqE1ZDk=", + "owner": "hyprwm", + "repo": "hyprland-plugins", + "rev": "8b4405ab46cafc471d5b09ff7258676dc9aaca59", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-plugins", + "type": "github" + } + }, "hyprland-protocols": { "inputs": { "nixpkgs": [ @@ -1363,6 +1393,7 @@ "ghostty": "ghostty", "home-manager": "home-manager", "hyprland": "hyprland", + "hyprland-plugins": "hyprland-plugins", "impermanence": "impermanence", "nix-index-database": "nix-index-database", "nix-on-droid": "nix-on-droid", diff --git a/flake.nix b/flake.nix index ecc4418..e4f2113 100755 --- a/flake.nix +++ b/flake.nix @@ -153,6 +153,11 @@ url = "github:nix-community/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; }; + hyprland.url = "github:hyprwm/Hyprland"; + hyprland-plugins = { + url = "github:hyprwm/hyprland-plugins"; + inputs.hyprland.follows = "hyprland"; + }; ghostty.url = "github:ghostty-org/ghostty"; nixos-hardware.url = "github:nixos/nixos-hardware"; nixpkgs-f2k.url = "github:moni-dz/nixpkgs-f2k"; @@ -160,7 +165,6 @@ sops-nix.url = "github:Mic92/sops-nix"; impermanence.url = "github:nix-community/impermanence"; deploy-rs.url = "github:serokell/deploy-rs"; - hyprland.url = "github:hyprwm/Hyprland"; nixcord.url = "github:kaylorben/nixcord"; }; } diff --git a/modules/home/desktop/hyprland/default.nix b/modules/home/desktop/hyprland/default.nix index ab414e3..1338c36 100644 --- a/modules/home/desktop/hyprland/default.nix +++ b/modules/home/desktop/hyprland/default.nix @@ -8,6 +8,10 @@ xwayland.enable = true; systemd.variables = ["--all"]; + plugins = with pkgs.hyprland-plugins; [ + hyprexpo + ]; + settings = let # Hyprland border_size = 0; @@ -126,6 +130,20 @@ "workspace 5 silent, class:(discord|Spotify|org.telegram.desktop)" ]; + plugin = { + hyprexpo = { + columns = 3; + gap_size = 5; + bg_col = "rgb(111111)"; + workspace_method = "center current"; + + enable_gesture = true; + gesture_fingers = 3; + gesture_distance = 300; + gesture_positive = true; + }; + }; + bind = [ # apps "SUPER, Return, exec, ${terminal}" @@ -147,6 +165,7 @@ # hyprland "SUPER, Q, killactive" + "SUPER, grave, hyprexpo:expo, toggle" "SUPER_SHIFT, Q, forcekillactive" "SUPER_SHIFT, F, fullscreen, 0" "SUPER_SHIFT, Space, togglefloating" @@ -211,6 +230,9 @@ ]; "exec-once" = [ + # load hyprland plugins + "hyprctl plugin load '$HYPR_PLUGIN_DIR/lib/libhyprexpo.so'" + "${pkgs.swaybg}/bin/swaybg -i ~/Wallpapers/island-night.png" "${pkgs.tpanel}/bin/tpanel" "copyq" diff --git a/overlays/default.nix b/overlays/default.nix index 97ae37e..6bf081b 100755 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -12,6 +12,7 @@ trok = inputs.trok.packages.${prev.system}.default; cyber-tux = inputs.cyber-tux.packages.${prev.system}.default; hyprland-git = inputs.hyprland.packages.${prev.system}; + hyprland-plugins = inputs.hyprland-plugins.packages.${prev.system}; }; # When applied, the stable nixpkgs set (declared in the flake inputs) will