From 3e07774e9bb748a10671724fdd93f7fef8eeaf60 Mon Sep 17 00:00:00 2001 From: iFargle Date: Sun, 7 Jan 2024 12:03:33 +0900 Subject: [PATCH] Test resize submap --- flake.nix | 6 ++++++ .../desktops/hyprland/components/hyprland.nix | 20 +++++++++++++++---- .../desktops/hyprland/default.nix | 1 + 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 8c494da1..2e3e8809 100644 --- a/flake.nix +++ b/flake.nix @@ -40,6 +40,12 @@ plasma-manager.inputs.nixpkgs.follows = "nixpkgs"; # Nix colorizer / themer stylix.url = "github:danth/stylix"; + # Hyprland Flake + hyprland.url = "github:hyprwm/Hyprland"; + # Hyprland Plugins + hyprland-plugins.url = "github:hyprwm/hyprland-plugins"; + hyprland-plugins.inputs.hyprland.follows = "hyprland"; + }; }; outputs = { self, nixpkgs, nixpkgs-wayland, home-manager, lanzaboote, nur, sops-nix, doom-emacs, nixos-generators, deploy-rs, ... } @inputs: let diff --git a/home-manager/common/desktops/hyprland/components/hyprland.nix b/home-manager/common/desktops/hyprland/components/hyprland.nix index c3fd87b5..f4991af3 100644 --- a/home-manager/common/desktops/hyprland/components/hyprland.nix +++ b/home-manager/common/desktops/hyprland/components/hyprland.nix @@ -1,6 +1,22 @@ { ... }: { wayland.windowManager.hyprland = { enable = true; + extraCommands = '' + # Resize + SUPER, R, exec, notify-send 'Entered resize mode. Press ESC to quit.' + SUPER, R, submap, resize + submap = resize + binde = , H, resizeactive,-50 0 + binde = , L, resizeactive,50 0 + binde = , K, resizeactive,0 -50 + binde = , J, resizeactive,0 50 + binde = , left, resizeactive,-50 0 + binde = , right, resizeactive,50 0 + binde = , up, resizeactive,0 -50 + binde = , down, resizeactive,0 50 + bind = , escape, submap, reset + submap = reset + ''; settings = { layerrule = "blur, waybar"; xwayland.force_zero_scaling = true; @@ -120,10 +136,6 @@ ''SUPER, mouse_down, workspace, e+1'' ''SUPER, mouse_up, workspace, e-1'' - # Resize - ''SUPER, R, exec, notify-send "Entered resize mode. Press ESC to quit."'' - ''SUPER, R, submap, resize'' - ############################################################################# # Custom keybinds # Show Rofi on SUPER-SPACE diff --git a/home-manager/hosts/nixos-desktop/desktops/hyprland/default.nix b/home-manager/hosts/nixos-desktop/desktops/hyprland/default.nix index 26d107d6..34f75899 100644 --- a/home-manager/hosts/nixos-desktop/desktops/hyprland/default.nix +++ b/home-manager/hosts/nixos-desktop/desktops/hyprland/default.nix @@ -1,5 +1,6 @@ { theme, ... }: { wayland.windowManager.hyprland = { + xwayland.enable = true; settings = { monitor = [ "DP-4, highrr, 2560x0, 1"