1{
2 pkgs,
3 inputs,
4 lib,
5 ...
6}:
7let
8 programs = inputs.hyprland.packages.${pkgs.system}.default;
9
10 startscript = pkgs.writeShellScript "gamemode-start" ''
11 export PATH=$PATH:${programs}
12 export HYPRLAND_INSTANCE_SIGNATURE=$(ls -w1 /tmp/hypr | tail -1)
13 hyprctl --batch 'keyword decoration:blur 0 ; keyword animations:enabled 0 ; keyword misc:no_vfr 1'
14 '';
15
16 endscript = pkgs.writeShellScript "gamemode-end" ''
17 export PATH=$PATH:${programs}
18 export HYPRLAND_INSTANCE_SIGNATURE=$(ls -w1 /tmp/hypr | tail -1)
19 hyprctl --batch 'keyword decoration:blur 1 ; keyword animations:enabled 1 ; keyword misc:no_vfr 0'
20 '';
21in
22{
23 programs.gamemode = {
24 enable = true;
25 enableRenice = true;
26 settings = {
27 general = {
28 softrealtime = "auto";
29 renice = 15;
30 };
31 custom = {
32 # start = "${startscript}";
33 # end = "${endscript}";
34 };
35 };
36 };
37}