From 1bbb9fca95f632e828c66229c988e943cf050f4b Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Thu, 28 Sep 2023 06:31:59 -0500 Subject: [PATCH] finally a (barely) functional hyprland config --- flake.nix | 5 +++++ home/features/desktop/hyprland.nix | 10 +++++++++- home/pixnix.nix | 25 +------------------------ 3 files changed, 15 insertions(+), 25 deletions(-) diff --git a/flake.nix b/flake.nix index 5df4563..6fb6032 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,11 @@ # - https://github.com/Misterio77/nix-starter-configs/ # - https://github.com/Misterio77/nix-config/ + nixConfig = { + extra-substituters = [ "https://hyprland.cachix.org" ]; + extra-trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ]; + }; + inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; # You can access packages and modules from different nixpkgs revs diff --git a/home/features/desktop/hyprland.nix b/home/features/desktop/hyprland.nix index 15a2fd9..42ba8a5 100644 --- a/home/features/desktop/hyprland.nix +++ b/home/features/desktop/hyprland.nix @@ -5,6 +5,14 @@ bind = $mod, F, exec, firefox bind = , Print, exec, grimblast copy area bind = $mod, Q, exec, kitty + bind = $mod, C, killactive, + bind = $mod, M, exit + + input { + touchpad { + natural_scroll = yes + } + } # workspaces # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} @@ -22,4 +30,4 @@ 10)} ''; -} \ No newline at end of file +} diff --git a/home/pixnix.nix b/home/pixnix.nix index 37641c0..f8a40f4 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 @@ -12,27 +12,4 @@ 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)} - - ''; }