summaryrefslogtreecommitdiffstats
path: root/player/lua
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2024-01-20 22:11:56 -0600
committerDudemanguy <random342@airmail.cc>2024-01-22 14:41:36 +0000
commit6ae5ff26b0812052c2c6586edd0e88e42bd96bb3 (patch)
treed3addea584cf2cf8795a387cf0b1a79b59f7365d /player/lua
parentb0e6ac380f6dd1a3196de0b2426f71a3e3f68bff (diff)
downloadmpv-6ae5ff26b0812052c2c6586edd0e88e42bd96bb3.tar.bz2
mpv-6ae5ff26b0812052c2c6586edd0e88e42bd96bb3.tar.xz
osc: add osc-windowcontrols_title option
This allows the title shown with the windowcontrols to be controlled separately from the normal osc title. Fixes #13295.
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/osc.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index 7221de9867..06f73878ad 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -52,6 +52,7 @@ local user_opts = {
boxvideo = false, -- apply osc_param.video_margins to video
windowcontrols = "auto", -- whether to show window controls
windowcontrols_alignment = "right", -- which side to show window controls on
+ windowcontrols_title = "${media-title}", -- same as title but for windowcontrols
greenandgrumpy = false, -- disable santa hat
livemarkers = true, -- update seekbar chapter markers on duration change
chapters_osd = true, -- whether to show chapters OSD on next/prev
@@ -1160,7 +1161,7 @@ function window_controls(topbar)
-- Window Title
ne = new_element("wctitle", "button")
ne.content = function ()
- local title = mp.command_native({"expand-text", user_opts.title})
+ local title = mp.command_native({"expand-text", user_opts.windowcontrols_title})
-- escape ASS, and strip newlines and trailing slashes
title = title:gsub("\\n", " "):gsub("\\$", ""):gsub("{","\\{")
return not (title == "") and title or "mpv"