From d1b1556076f36ab7f59e82d99952fc9607c67551 Mon Sep 17 00:00:00 2001 From: Kat Inskip Date: Tue, 7 Oct 2025 12:13:57 -0700 Subject: [PATCH] feat(katwine): wc3 --- home/environments/niri/niri.nix | 2 ++ home/environments/niri/window-rules.nix | 13 +++++++++++++ nixos/profiles/gaming/wine.nix | 11 ++++++++--- packages/katwine/script.sh | 20 +++++++++++++------- 4 files changed, 36 insertions(+), 10 deletions(-) diff --git a/home/environments/niri/niri.nix b/home/environments/niri/niri.nix index fafe3c76..f2d7d0c3 100644 --- a/home/environments/niri/niri.nix +++ b/home/environments/niri/niri.nix @@ -70,6 +70,8 @@ in { }; }; debug = { + honor-xdg-activation-with-invalid-serial = {}; + #strict-new-window-focus-policy = {}; #deactivate-unfocused-windows = {}; }; workspaces = { diff --git a/home/environments/niri/window-rules.nix b/home/environments/niri/window-rules.nix index 5da961fd..c07b924c 100644 --- a/home/environments/niri/window-rules.nix +++ b/home/environments/niri/window-rules.nix @@ -51,6 +51,19 @@ _: { ]; open-on-workspace = "chat"; } + { + matches = [ + { + app-id = "steam"; + title = "^notificationtoasts_\d+_desktop$"; + } + ]; + default-floating-position = { + x = 10; + y = 10; + relative-to = "bottom-right"; + }; + } { matches = [ {app-id = "^steam_app_default$";} diff --git a/nixos/profiles/gaming/wine.nix b/nixos/profiles/gaming/wine.nix index 907b49e8..65742970 100644 --- a/nixos/profiles/gaming/wine.nix +++ b/nixos/profiles/gaming/wine.nix @@ -58,17 +58,22 @@ PROTON_GE = "${inputs.chaotic.packages.${pkgs.system}.proton-ge-custom.out}/bin"; }; }; + # https://lutris.net/games/install/25450/view + # Dissection: + # * nvapi disables, + # * registry key for Win7 in version systemd.user.services.wc3 = { description = "Warcraft 3"; serviceConfig = { - ExecStart = "${pkgs.katwine}/bin/katwine wc3 wc3"; + ExecStart = "${pkgs.katwine}/bin/katwine wc3"; Type = "simple"; }; environment = { PROTON_CACHYOS = "${inputs.chaotic.packages.${pkgs.system}.proton-cachyos_x86_64_v3.out}/bin"; PROTON_GE = "${inputs.chaotic.packages.${pkgs.system}.proton-ge-custom.out}/bin"; - #PROTON_WC3 = "/home/kat/.local/share/Steam/compatibilitytools.d/GE-Proton10-3"; - PROTON_WC3 = "/home/kat/.local/share/Steam/steamapps/common/Proton - Experimental"; + #PROTON_WC3 = "/home/kat/.local/share/Steam/compatibilitytools.d/GE-Proton10-1"; + #PROTON_WC3 = "/home/kat/.local/share/Steam/compatibilitytools.d/Proton-Tkg-2367"; + #PROTON_WC3 = "/home/kat/.local/share/Steam/steamapps/common/Proton - Experimental"; }; }; systemd.user.services.kanon = { diff --git a/packages/katwine/script.sh b/packages/katwine/script.sh index c8d8bc56..ecd891b9 100755 --- a/packages/katwine/script.sh +++ b/packages/katwine/script.sh @@ -51,7 +51,7 @@ proton_setup() { # wine_runner() { - env TZ="$TZ_IN" LC_ALL="$LC_IN" WINEARCH="$WINEARCH" WINEPREFIX="$WINEPREFIX" wine "$@" + env WINEARCH="$WINEARCH" WINEPREFIX="$WINEPREFIX" wine "$@" } proton_runner() { @@ -71,8 +71,8 @@ proton_runner() { vn() { WINEPREFIX="${GAMES_DIR}/VNs" cd "$WINEPREFIX" - LC_IN="ja_JP.UTF-8" - TZ_IN="Asia/Tokyo" + export LC_ALL="ja_JP.UTF-8" + export TZ="Asia/Tokyo" wine_runner "./drive_c/cmd.exe" /k "C:/script.bat" "$@" } @@ -80,20 +80,24 @@ battlenet() { WINEPREFIX="${GAMES_DIR}/battlenet" GAMEDIR="${WINEPREFIX}/drive_c/Program Files (x86)/Battle.net" GAME_EXE="${GAMEDIR}/Battle.net.exe" - proton_setup + system_conf + proton_conf + dxvk_conf + caches_conf if [ "$#" -ge 1 ]; then case $1 in (sc1|s1|sc) - proton_runner "$GAME_EXE" "--exec=\"launch S1\"" + proton_runner "$GAME_EXE" "--in-process-gpu" "--exec=\"launch S1\"" ;; (sc2|s2) - proton_runner "$GAME_EXE" "--exec=\"launch S2\"" + proton_runner "$GAME_EXE" "--in-process-gpu" "--exec=\"launch S2\"" ;; (wc3|w3) # TODO: build and ship a custom patched wine for this... jfc export STAGING_SHARED_MEMORY=1 export __GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1 - proton_runner "$GAME_EXE" "--exec=\"launch W3\"" + proton_runner "$GAME_EXE" "--in-process-gpu" "--exec=\"launch W3\"" + #proton_runner "${WINEPREFIX}/drive_c/Program Files (x86)/Warcraft III/_retail_/x86_64/Warcraft III.exe" "-launch" ;; esac else @@ -130,6 +134,8 @@ main() { fi export PROTON_LOG=1 + export WINEDEBUG="+warn" + export WINEUSERSANDBOX=1 case "$GAME" in (kanon)