From 50509d4b9225ddd596bcdb5385cc6d5c2e158983 Mon Sep 17 00:00:00 2001 From: grassblock Date: Thu, 23 Jan 2025 16:23:03 +0800 Subject: [PATCH] feat: mpv: auto resize window when playing very large/small media --- .../private_mpv/executable_mpv.conf | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/home/private_dot_config/private_mpv/executable_mpv.conf b/home/private_dot_config/private_mpv/executable_mpv.conf index 391b41b..ab5c27c 100644 --- a/home/private_dot_config/private_mpv/executable_mpv.conf +++ b/home/private_dot_config/private_mpv/executable_mpv.conf @@ -5,11 +5,11 @@ osd-bar=no # uosc will draw its own window controls if you disable window border border=yes # osd font -osd-font="Source Han Sans CN" +osd-font="Sarasa UI SC" [default] sub-codepage = cp936 -slang = zh_CN,zho,chi,zh,zh_TW,eng,en,jpn,ja +slang = zh_CN,zho,chi,zh,zh_TW,eng,en,danmuku,jpn,ja sub-pos = 95 sub-font-size = 30 demuxer-readahead-secs = 20 @@ -33,6 +33,18 @@ ytdl-format=(bestvideo[height<=3840][vcodec^=vp]/bestvideo[height<=3840])+bestau # use yt-dlp script-opts=ytdl_hook-ytdl_path=yt-dlp +[smaller-window] +profile-desc = "Automatically make the window smaller when the width of video is larger than the screen height" +profile-cond=height >= 1200 +autofit-larger=2240x1400 +window-scale=0.4 + +[bigger-window] +profile-desc = "Automatically make the window bigger when the width of video is quite small than the screen height" +profile-cond=height <= 480 +autofit-smaller=720x480 +window-scale=1.5 + [lilyboudoir] # use too much GPU that lilyforest cannot afford profile-desc = High GPU