From 244fd6daada03681c0eb47f007bbf7941981e9f9 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Tue, 16 Apr 2024 08:11:12 -0400 Subject: [PATCH] feat(hypr): hyprexpo -> Hyprspace --- flake.lock | 80 +++++++++++++++++++++++----------- flake.nix | 6 +-- modules/hyprland/Hyprspace.nix | 15 +++++++ modules/hyprland/default.nix | 2 +- modules/hyprland/hyprexpo.nix | 28 ------------ 5 files changed, 73 insertions(+), 58 deletions(-) create mode 100644 modules/hyprland/Hyprspace.nix delete mode 100644 modules/hyprland/hyprexpo.nix diff --git a/flake.lock b/flake.lock index ff5390a..9010d3f 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,31 @@ { "nodes": { + "Hyprspace": { + "inputs": { + "hyprland": [ + "hyprland" + ], + "hyprlandPlugins": "hyprlandPlugins", + "nixpkgs": [ + "Hyprspace", + "hyprland", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1713240951, + "narHash": "sha256-Nvbn1baUNN7AQOA1hHunUHuFziF0dErqaTlfxr9NNwo=", + "owner": "KZDKM", + "repo": "Hyprspace", + "rev": "954eda50aca5ef986c557f3b515c4321fd3c7fd8", + "type": "github" + }, + "original": { + "owner": "KZDKM", + "repo": "Hyprspace", + "type": "github" + } + }, "ags": { "inputs": { "nixpkgs": [ @@ -447,31 +473,6 @@ "type": "github" } }, - "hypr-official-plugins": { - "inputs": { - "hyprland": [ - "hyprland" - ], - "systems": [ - "hypr-official-plugins", - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1712836056, - "narHash": "sha256-qf6yev9OlJuQv557ApLQ/5V8pQj0YOO9tyh5j3It1mY=", - "owner": "hyprwm", - "repo": "hyprland-plugins", - "rev": "e9457e08ca3ff16dc5a815be62baf9e18b539197", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-plugins", - "type": "github" - } - }, "hyprcursor": { "inputs": { "hyprlang": [ @@ -574,6 +575,33 @@ "type": "github" } }, + "hyprlandPlugins": { + "inputs": { + "hyprland": [ + "Hyprspace", + "hyprland" + ], + "systems": [ + "Hyprspace", + "hyprlandPlugins", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1712836056, + "narHash": "sha256-qf6yev9OlJuQv557ApLQ/5V8pQj0YOO9tyh5j3It1mY=", + "owner": "hyprwm", + "repo": "hyprland-plugins", + "rev": "e9457e08ca3ff16dc5a815be62baf9e18b539197", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-plugins", + "type": "github" + } + }, "hyprlang": { "inputs": { "nixpkgs": [ @@ -1475,6 +1503,7 @@ }, "root": { "inputs": { + "Hyprspace": "Hyprspace", "ags": "ags", "arion": "arion", "astal": "astal", @@ -1489,7 +1518,6 @@ "gtk-theme-src": "gtk-theme-src", "headscale": "headscale", "home-manager": "home-manager", - "hypr-official-plugins": "hypr-official-plugins", "hypridle": "hypridle", "hyprland": "hyprland", "hyprlock": "hyprlock", diff --git a/flake.nix b/flake.nix index 75ea68f..714f0e5 100644 --- a/flake.nix +++ b/flake.nix @@ -252,10 +252,10 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - hypr-official-plugins = { + Hyprspace = { type = "github"; - owner = "hyprwm"; - repo = "hyprland-plugins"; + owner = "KZDKM"; + repo = "Hyprspace"; inputs.hyprland.follows = "hyprland"; }; diff --git a/modules/hyprland/Hyprspace.nix b/modules/hyprland/Hyprspace.nix new file mode 100644 index 0000000..9300960 --- /dev/null +++ b/modules/hyprland/Hyprspace.nix @@ -0,0 +1,15 @@ +{ + Hyprspace, + pkgs, + ... +}: { + wayland.windowManager.hyprland = { + plugins = [Hyprspace.packages.${pkgs.system}.Hyprspace]; + + settings = { + bind = [ + "ALT, tab, overview:toggle" + ]; + }; + }; +} diff --git a/modules/hyprland/default.nix b/modules/hyprland/default.nix index a154be2..079e4f5 100644 --- a/modules/hyprland/default.nix +++ b/modules/hyprland/default.nix @@ -54,7 +54,7 @@ in { # HOME-MANAGER CONFIG home-manager.users.${mainUser} = { imports = [ - ./hyprexpo.nix + ./Hyprspace.nix ./inputs.nix ./style.nix ]; diff --git a/modules/hyprland/hyprexpo.nix b/modules/hyprland/hyprexpo.nix deleted file mode 100644 index c775a8c..0000000 --- a/modules/hyprland/hyprexpo.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - 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 - ]; - }; - }; -}