From 23abcd7c1dab38b9de5d87cdf2ced1e8773a9254 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Mon, 3 Feb 2025 17:44:46 +0100 Subject: [PATCH] Some more hyprland customization. --- hosts/nixos/home.nix | 1 + modules/home-manager/hyprland.nix | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/hosts/nixos/home.nix b/hosts/nixos/home.nix index dc2d8b4..4a27d68 100644 --- a/hosts/nixos/home.nix +++ b/hosts/nixos/home.nix @@ -35,6 +35,7 @@ protonup-qt protontricks jellyfin-mpv-shim + fractal ]; # Install librewolf diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index 8cba1b2..4794574 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -3,7 +3,24 @@ pkgs, lib, ... -}: { +}: let + gamemode = pkgs.writeShellScriptBin "gamemode" '' + #!/usr/bin/env sh + HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}') + if [ "$HYPRGAMEMODE" = 1 ] ; then + hyprctl --batch "\ + keyword animations:enabled 0;\ + keyword decoration:shadow:enabled 0;\ + keyword decoration:blur:enabled 0;\ + keyword general:gaps_in 0;\ + keyword general:gaps_out 0;\ + keyword general:border_size 1;\ + keyword decoration:rounding 0" + exit + fi + hyprctl reload + ''; +in { options = { crony.hyprland.enable = lib.mkEnableOption "Enable hyprland and configure it for me"; }; @@ -161,6 +178,7 @@ input = { kb_layout = "us"; kb_options = "caps:escape"; + accel_profile = "flat"; }; master = { @@ -182,6 +200,8 @@ "$mod, L, exec, hyprlock --immediate" + "$mod, G, exec, ${gamemode}" + "$mod, V, exec, cliphist list | tofi --horizontal false --height 380 | cliphist decode | wl-copy" "$mod, j, layoutmsg, cyclenext"