From c0a973924a3f34cb54c93684cea7d980209418be Mon Sep 17 00:00:00 2001 From: tristan Date: Sat, 10 Feb 2024 20:26:54 +0000 Subject: [PATCH] use hyprland overlays --- flake.nix | 5 ++++- home/desktop/hyprland/default.nix | 16 ++++++++++++++++ home/programs/gamer.nix | 4 ++++ lib/mkconf.nix | 3 +-- nixos/default.nix | 2 +- 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 56cb9e5..4993de8 100644 --- a/flake.nix +++ b/flake.nix @@ -18,7 +18,10 @@ outputs = inputs: let system = "x86_64-linux"; - pkgs = import inputs.nixpkgs {inherit system;}; + pkgs = import inputs.nixpkgs { + inherit system; + overlays = [ inputs.hyprland.overlays ]; + }; user = "tristan"; userFullname = "Tristan Beedell"; auto-login = import ./nixos/programs/auto-login.nix; diff --git a/home/desktop/hyprland/default.nix b/home/desktop/hyprland/default.nix index 7d4d0d4..bb09fab 100644 --- a/home/desktop/hyprland/default.nix +++ b/home/desktop/hyprland/default.nix @@ -5,6 +5,7 @@ ... }: let modifier = config.windowManager.modifierKey; + menu = config.programs.menu.dmenuCommand; in { imports = [ (import ../utils/swaylock.nix) @@ -187,6 +188,21 @@ in { ''; }; + programs.scripts = [ + { + name = "focus-application"; + install = true; + text = '' + windows=$(hyprctl clients -j | jq -r '.[] | .title') + window=$(echo "$windows" | ${menu}) + hyprctl dispatch focuswindow title:"$window" + ''; + hotkeys = [{ + key = "tab"; + }]; + } + ]; + services.mako = { enable = true; }; diff --git a/home/programs/gamer.nix b/home/programs/gamer.nix index b87e7ff..461dc40 100644 --- a/home/programs/gamer.nix +++ b/home/programs/gamer.nix @@ -8,6 +8,10 @@ # Helpers heroic + lutris + gamescope + gamemode + mangohud BeatSaberModManager protontricks protonup-qt diff --git a/lib/mkconf.nix b/lib/mkconf.nix index a03e41d..ad17d62 100644 --- a/lib/mkconf.nix +++ b/lib/mkconf.nix @@ -23,6 +23,7 @@ with inputs; users.${user}.imports = home-modules ++ [ + hyprland.homeManagerModules.default ../home/. { options.home.userFullname = nixpkgs.lib.mkOption {default = userFullname;}; @@ -30,9 +31,7 @@ with inputs; } ]; }; - programs.hyprland.package = hyprland.packages."${system}".hyprland; nixpkgs.config.packageOverrides = pkgs: { - inherit (hyprland.packages.${system}) xdg-desktop-portal-hyprland hyprland hyprland-protocols; hycov = hycov.packages.${system}.hycov; }; imports = [ diff --git a/nixos/default.nix b/nixos/default.nix index 89884bc..2273e78 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -132,10 +132,10 @@ in { environment.systemPackages = with pkgs; [ tealdeer alsa-utils - pavucontrol trash-cli wget unzip + fzf ]; services.dbus.enable = true;