0
0
mirror of https://github.com/cucumber-sp/yandex-music-linux.git synced 2025-04-01 23:03:44 +03:00

Vibe fps control

This commit is contained in:
Nikolay Bely 2025-02-07 11:05:54 +07:00
parent 24b3809899
commit 73ae98d3e2
5 changed files with 21 additions and 1 deletions

View File

@ -163,6 +163,12 @@ Yandex Music's custom Windows-styled titlebar can be enabled by setting `CUSTOM_
***
### Vibe animation FPS control
Vibe animation FPS can be control by setting `VIBE_ANIMATION_MAX_FPS` option from `0` (black screen) to any reasonable number. Default `25`.
***
## Manual Build
### Prerequisites

View File

@ -0,0 +1,11 @@
diff --git a/main/lib/preload.js b/main/lib/preload.js
--- a/main/lib/preload.js
+++ b/main/lib/preload.js
@@ -12,2 +12,3 @@ const deviceInfo_js_1 = require("./deviceInfo.js");
const trayEnabled = process.env.TRAY_ENABLED && process.env.TRAY_ENABLED > 0;
+const vibeAnimationMaxFps = process.env.VIBE_ANIMATION_MAX_FPS ?? 25;
electron_1.contextBridge.exposeInMainWorld('VERSION', String(config_js_1.config.buildInfo.VERSION));
@@ -19,2 +20,3 @@ const deviceInfo_js_1 = require("./deviceInfo.js");
electron_1.contextBridge.exposeInMainWorld('IS_TRAY_ENABLED', trayEnabled);
+electron_1.contextBridge.exposeInMainWorld('VIBE_ANIMATION_MAX_FPS', vibeAnimationMaxFps);
electron_1.contextBridge.exposeInMainWorld('desktopEvents', {

View File

@ -77,6 +77,7 @@ find "./" -type f \( -name "*.js" -o -name "*.js.map" \) -print0 | while IFS= re
sed -i 's/LINUX:"98548790"/LINUX:"95673843"/g' "$file"
sed -i 's/LINUX:"d2bcdb71-90ac-493b-b68f-024321954a5d"/LINUX:"0d8ab1a6-1667-42cb-a98f-2fe7eff4b137"/g' "$file"
sed -i 's/case n.t.LINUX:e="uVNvVMAvdrvjtwN0VlhEt2"/case n.t.LINUX:e="kzqU4XhfCaY6B6JTHODeq5"/g' "$file"
sed -i 's/t\.MAX_FPS=25/t.MAX_FPS=window.VIBE_ANIMATION_MAX_FPS??25/g' "$file"
done
echo ".js chunks patched"

View File

@ -1,4 +1,5 @@
ELECTRON_CUSTOM_BIN=
ELECTRON_ARGS="--no-sandbox"
TRAY_ENABLED=0
DEV_TOOLS=0
DEV_TOOLS=0
VIBE_ANIMATION_MAX_FPS=25

View File

@ -25,5 +25,6 @@ ELECTRON_BIN=${ELECTRON_CUSTOM_BIN:-%electron_path%}
export TRAY_ENABLED=${TRAY_ENABLED:-0}
export DEV_TOOLS=${DEV_TOOLS:-0}
export CUSTOM_TITLE_BAR=${CUSTOM_TITLE_BAR:-0}
export VIBE_ANIMATION_MAX_FPS=${VIBE_ANIMATION_MAX_FPS:-25}
exec "${ELECTRON_BIN}" "%asar_path%" $ELECTRON_ARGS $WAYLAND_FLAGS