From c292a0370735544a0b5716383f3921f3fd923fc8 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Tue, 26 Sep 2023 20:24:07 -0500 Subject: [PATCH] more hyprland tinkering... --- flake.nix | 8 ++++++-- home/features/desktop/hyprland.nix | 1 - home/pixnix.nix | 26 +++++++++++++++++++++++++- hosts/pixnix/default.nix | 2 +- 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index b993446..5df4563 100644 --- a/flake.nix +++ b/flake.nix @@ -31,7 +31,7 @@ }; }; - outputs = { self, nixpkgs, home-manager, ... } @inputs: + outputs = { self, nixpkgs, home-manager, hyprland, ... } @inputs: let inherit (self) outputs; lib = nixpkgs.lib // home-manager.lib; @@ -77,7 +77,11 @@ extraSpecialArgs = { inherit inputs outputs; }; }; "john@pixnix" = lib.homeManagerConfiguration { - modules = [ ./home/pixnix.nix ]; + modules = [ + ./home/pixnix.nix + hyprland.homeManagerModules.default + {wayland.windowManager.hyprland.enable = true;} + ]; pkgs = pkgsFor.x86_64-linux; extraSpecialArgs = { inherit inputs outputs; }; }; diff --git a/home/features/desktop/hyprland.nix b/home/features/desktop/hyprland.nix index ec05165..15a2fd9 100644 --- a/home/features/desktop/hyprland.nix +++ b/home/features/desktop/hyprland.nix @@ -21,6 +21,5 @@ ) 10)} - # ... ''; } \ No newline at end of file diff --git a/home/pixnix.nix b/home/pixnix.nix index a929a49..37641c0 100644 --- a/home/pixnix.nix +++ b/home/pixnix.nix @@ -3,7 +3,7 @@ ./global ./features/cli/extras ./features/desktop - ./features/desktop/hyprland.nix + # ./features/desktop/hyprland.nix ]; # packages @@ -11,4 +11,28 @@ kitty vagrant ]; + + wayland.windowManager.hyprland.extraConfig = '' + $mod = SUPER + + bind = $mod, F, exec, firefox + bind = , Print, exec, grimblast copy area + bind = $mod, Q, exec, kitty + + # workspaces + # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} + ${builtins.concatStringsSep "\n" (builtins.genList ( + x: let + ws = let + c = (x + 1) / 10; + in + builtins.toString (x + 1 - (c * 10)); + in '' + bind = $mod, ${ws}, workspace, ${toString (x + 1)} + bind = $mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)} + '' + ) + 10)} + + ''; } diff --git a/hosts/pixnix/default.nix b/hosts/pixnix/default.nix index c2009c7..12d0187 100644 --- a/hosts/pixnix/default.nix +++ b/hosts/pixnix/default.nix @@ -10,7 +10,7 @@ ../common/optional/docker.nix #../common/optional/gnome.nix - # ../common/optional/hyprland.nix + ../common/optional/hyprland.nix ../common/optional/libvirtd.nix ../common/optional/pipewire.nix ../common/optional/printing.nix