Mangohud : Refactor.

This commit is contained in:
Dmitry Voronin 2024-04-30 20:36:22 +03:00
parent 17db78b195
commit 17d354489f
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
4 changed files with 52 additions and 43 deletions

View file

@ -1,4 +1,6 @@
{ pkgs, ... }: {
{ pkgs, ... } @args: let
mangohud = import ./mangohud args;
in {
xdg.mime.defaultApplications = {
# Use `file -i file.txt` to find file mime type.
# Use `xdg-mime query default "text/plain"` to find default app.
@ -14,7 +16,7 @@
packages = with pkgs; [
dxvk
gamescope
mangohud
pkgs.mangohud
vkd3d
];
in {
@ -27,7 +29,7 @@
android-studio jetbrains.idea-community
appimage-run
blender-hip
bottles dxvk gamescope mangohud vkd3d wine64
bottles dxvk gamescope pkgs.mangohud vkd3d wine64
calibre
gimp
godot_4
@ -43,8 +45,8 @@
variables = {
# MangoHud.
MANGOHUD = "1";
MANGOHUD_CONFIGFILE = ./mangohud/MangoHud.conf;
MANGOHUD_PRESETSFILE = ./mangohud/MangoPresets.conf;
MANGOHUD_CONFIGFILE = pkgs.writeText "mangoConfig" mangohud.config;
MANGOHUD_PRESETSFILE = pkgs.writeText "mangoPreset" mangohud.presets;
# Proton.
WINEFSYNC = "1";

View file

@ -1,12 +0,0 @@
af=16
blacklist=example
fps_limit=165
fps_limit_method=early
fps_sampling_period=1000
frame_timing=0
gl_vsync=1
no_display=0
preset=1,0,2
toggle_preset=F1
toggle_logging=F2
vsync=3

View file

@ -1,26 +0,0 @@
[preset 0]
no_display=1
[preset 1]
alpha=1.0
arch=0
background_alpha=0.5
battery=1
battery_time=1
benchmark_percentiles=0
cpu_temp=1
device_battery=gamepad,mouse
font_size=12
fps_sampling_period=1000
gpu_junction_temp=1
gpu_mem_temp=1
gpu_temp=1
hud_no_margin=1
ram=1
swap=1
throttling_status=1
time=1
vram=1
[preset 2]
full=1

View file

@ -0,0 +1,45 @@
{ util, ... }: {
config = util.trimTabs ''
af=16
blacklist=example
fps_limit=165
fps_limit_method=early
fps_sampling_period=1000
frame_timing=0
gl_vsync=1
no_display=0
preset=1,0,2
toggle_preset=F1
toggle_logging=F2
vsync=3
'';
presets = util.trimTabs ''
[preset 0]
no_display=1
[preset 1]
alpha=1.0
arch=0
background_alpha=0.5
battery=1
battery_time=1
benchmark_percentiles=0
cpu_temp=1
device_battery=gamepad,mouse
font_size=12
fps_sampling_period=1000
gpu_junction_temp=1
gpu_mem_temp=1
gpu_temp=1
hud_no_margin=1
ram=1
swap=1
throttling_status=1
time=1
vram=1
[preset 2]
full=1
'';
}