From 2226b33bc866e17d8752396046367a49d235a8c7 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sat, 6 Apr 2024 04:10:33 -0400 Subject: [PATCH] feat(hypr): add official overview plugin --- flake.lock | 26 ++++++++++++++++++++++++++ flake.nix | 7 +++++++ modules/hyprland/default.nix | 1 + modules/hyprland/hyprexpo.nix | 28 ++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 modules/hyprland/hyprexpo.nix diff --git a/flake.lock b/flake.lock index 511828dd..8e74a4a7 100644 --- a/flake.lock +++ b/flake.lock @@ -447,6 +447,31 @@ "type": "github" } }, + "hypr-official-plugins": { + "inputs": { + "hyprland": [ + "hyprland" + ], + "systems": [ + "hypr-official-plugins", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1712281995, + "narHash": "sha256-NoRAAqed5t3b3/Ebt5SW9BWh8dyKRmw9i9KjLcMdLsE=", + "owner": "hyprwm", + "repo": "hyprland-plugins", + "rev": "a7145f019254a7d953d56945c168d1bc698c35e4", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-plugins", + "type": "github" + } + }, "hyprcursor": { "inputs": { "hyprlang": "hyprlang_2", @@ -1487,6 +1512,7 @@ "gtk-theme-src": "gtk-theme-src", "headscale": "headscale", "home-manager": "home-manager", + "hypr-official-plugins": "hypr-official-plugins", "hyprgrass": "hyprgrass", "hypridle": "hypridle", "hyprland": "hyprland", diff --git a/flake.nix b/flake.nix index 8d38a830..bd4b0d8c 100644 --- a/flake.nix +++ b/flake.nix @@ -250,6 +250,13 @@ inputs.hyprland.follows = "hyprland"; }; + hypr-official-plugins = { + type = "github"; + owner = "hyprwm"; + repo = "hyprland-plugins"; + + inputs.hyprland.follows = "hyprland"; + }; ags = { type = "github"; diff --git a/modules/hyprland/default.nix b/modules/hyprland/default.nix index acff7f74..92eeb774 100644 --- a/modules/hyprland/default.nix +++ b/modules/hyprland/default.nix @@ -54,6 +54,7 @@ in { # HOME-MANAGER CONFIG home-manager.users.${mainUser} = { imports = [ + ./hyprexpo.nix ./hyprgrass.nix ./inputs.nix ./style.nix diff --git a/modules/hyprland/hyprexpo.nix b/modules/hyprland/hyprexpo.nix new file mode 100644 index 00000000..c775a8c8 --- /dev/null +++ b/modules/hyprland/hyprexpo.nix @@ -0,0 +1,28 @@ +{ + hypr-official-plugins, + pkgs, + ... +}: { + wayland.windowManager.hyprland = { + plugins = [hypr-official-plugins.packages.${pkgs.system}.hyprexpo]; + + settings = { + 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, 4 fingers + gesture_distance = 300; # how far is the "max" + gesture_positive = true; # positive = swipe down. Negative = swipe up. + }; + }; + + bind = [ + "ALT, tab, hyprexpo:expo, toggle" # can be: toggle, off/disable or on/enable + ]; + }; + }; +}