diff --git a/hosts/tkaronto/modules/gamemode.nix b/hosts/tkaronto/modules/gamemode.nix new file mode 120000 index 0000000..ce4e5fe --- /dev/null +++ b/hosts/tkaronto/modules/gamemode.nix @@ -0,0 +1 @@ +../../../modules/gamemode/default.nix \ No newline at end of file diff --git a/modules/gamemode/default.nix b/modules/gamemode/default.nix new file mode 100644 index 0000000..54bd55d --- /dev/null +++ b/modules/gamemode/default.nix @@ -0,0 +1,35 @@ +{ + pkgs, + inputs, + lib, + ... +}: let + programs = inputs.hyprland.packages.${pkgs.system}.default; + + startscript = pkgs.writeShellScript "gamemode-start" '' + export PATH=$PATH:${programs} + export HYPRLAND_INSTANCE_SIGNATURE=$(ls -w1 /tmp/hypr | tail -1) + hyprctl --batch 'keyword decoration:blur 0 ; keyword animations:enabled 0 ; keyword misc:no_vfr 1' + ''; + + endscript = pkgs.writeShellScript "gamemode-end" '' + export PATH=$PATH:${programs} + export HYPRLAND_INSTANCE_SIGNATURE=$(ls -w1 /tmp/hypr | tail -1) + hyprctl --batch 'keyword decoration:blur 1 ; keyword animations:enabled 1 ; keyword misc:no_vfr 0' + ''; +in { + programs.gamemode = { + enable = true; + enableRenice = true; + settings = { + general = { + softrealtime = "auto"; + renice = 15; + }; + custom = { + start = "${startscript}"; + end = "${endscript}"; + }; + }; + }; +} diff --git a/users/modules/hyprland/default.nix b/users/modules/hyprland/default.nix index 56da3fd..5a1aac6 100644 --- a/users/modules/hyprland/default.nix +++ b/users/modules/hyprland/default.nix @@ -17,7 +17,10 @@ inputs.hyprland.homeManagerModules.default ]; - home.sessionVariables.GDK_SCALE = "2"; + home.sessionVariables = { + GDK_SCALE = "2"; + QT_SCALE_FACTOR = "2"; + }; home.packages = with pkgs; [ wf-recorder diff --git a/users/patriot/default.nix b/users/patriot/default.nix index 80c9894..ae3a167 100644 --- a/users/patriot/default.nix +++ b/users/patriot/default.nix @@ -223,6 +223,8 @@ in { '' ) obs-studio + libreoffice-fresh + helvum ]; }; programs = {