Skip to content

Commit 0327896

Browse files
authored
Merge pull request #137 from Keith94/title-formatting
refactor: update title formatting
2 parents d684592 + 45105fe commit 0327896

File tree

3 files changed

+41
-35
lines changed

3 files changed

+41
-35
lines changed

docs/USER_OPTS.md

+33-31
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ Create `modernz.conf` in your mpv script-opts directory:
1212

1313
### General
1414

15-
| Option | Value | Description |
16-
| -------------- | ----- | -------------------------------------------------------- |
17-
| idlescreen | yes | show mpv logo on idle |
18-
| windowcontrols | auto | whether to show OSC window controls. `auto`, `yes`, `no` |
19-
| showwindowed | yes | show OSC when windowed |
20-
| showfullscreen | yes | show OSC when fullscreen |
21-
| greenandgrumpy | no | disable santa hat in December |
15+
| Option | Value | Description |
16+
| -------------- | ----- | -------------------------------------------------------------------------------------------------------------- |
17+
| language | en | See [TRANSLATIONS.md](https://github.com/Samillion/ModernZ/blob/main/docs/TRANSLATIONS.md) for other languages |
18+
| idlescreen | yes | show mpv logo on idle |
19+
| windowcontrols | auto | whether to show OSC window controls. `auto`, `yes`, `no` |
20+
| showwindowed | yes | show OSC when windowed |
21+
| showfullscreen | yes | show OSC when fullscreen |
22+
| greenandgrumpy | no | disable santa hat in December |
2223

2324
### Colors
2425

@@ -66,11 +67,11 @@ Create `modernz.conf` in your mpv script-opts directory:
6667

6768
### Scaling
6869

69-
| Option | Value | Description |
70-
| ----------------- | ----- | ---------------------------------------------- |
71-
| vidscale | yes | whether to scale the controller with the video |
72-
| scalewindowed | 1.0 | scaling of the controller when windowed |
73-
| scalefullscreen | 1.0 | scaling of the controller when fullscreen |
70+
| Option | Value | Description |
71+
| ----------------- | ----- | ---------------------------------------------- |
72+
| vidscale | auto | whether to scale the controller with the video. `no` to disable |
73+
| scalewindowed | 1.0 | scaling of the controller when windowed |
74+
| scalefullscreen | 1.0 | scaling of the controller when fullscreen |
7475

7576
### Time & Volume
7677

@@ -103,25 +104,26 @@ Create `modernz.conf` in your mpv script-opts directory:
103104

104105
### UI [elements]
105106

106-
| Option | Value | Description |
107-
| ------------------------------- | ---------------- | -------------------------------------------------------------------------- |
108-
| showtitle | yes | show title in OSC (above seekbar) |
109-
| showwindowtitle | yes | show window title in borderless/fullscreen mode |
110-
| showwindowcontrols | yes | show window controls (close, min, max) in borderless/fullscreen |
111-
| show_chapter_title | yes | show chapter title next to timestamp (below seekbar) |
112-
| titleBarStrip | no | whether to make the title bar a singular bar instead of a black fade |
113-
| title | `${media-title}` | title above seekbar. `${media-title}` or `${filename}` (can use `/no-ext`) |
114-
| font | mpv-osd-symbols | mpv-osd-symbols = default osc font (or the one set in mpv.conf) |
115-
| titlefontsize | 30 | the font size of the title text (above seekbar) |
116-
| chapter_fmt | Chapter: %s | chapter print format for seekbar-hover. `no` to disable |
117-
| tooltips_for_disabled_elements | yes | enables tooltips for disabled buttons and elements |
118-
| tooltip_hints | yes | enables text hints for the information, loop, ontop and screenshot buttons |
119-
| playpause_size | 30 | icon size for the play-pause button |
120-
| midbuttons_size | 24 | icon size for the middle buttons |
121-
| sidebuttons_size | 24 | icon size for the side buttons |
122-
| persistentprogress | no | always show a small progress line at the bottom of the screen |
123-
| persistentprogressheight | 17 | the height of the persistentprogress bar |
124-
| persistentbuffer | no | on web videos, show the buffer on the persistent progress line |
107+
| Option | Value | Description |
108+
| ------------------------------- | ---------------- | ----------------------------------------------------------------------------------- |
109+
| showtitle | yes | show title in OSC (above seekbar) |
110+
| showwindowtitle | yes | show window title in borderless/fullscreen mode |
111+
| showwindowcontrols | yes | show window controls (close, min, max) in borderless/fullscreen |
112+
| show_chapter_title | yes | show chapter title next to timestamp (below seekbar) |
113+
| titleBarStrip | no | whether to make the title bar a singular bar instead of a black fade |
114+
| title | `${media-title}` | title above seekbar |
115+
| windowcontrols_title | `${media-title}` | title in windowcontrols |
116+
| font | mpv-osd-symbols | mpv-osd-symbols = default osc font (or the one set in mpv.conf) |
117+
| titlefontsize | 30 | the font size of the title text (above seekbar) |
118+
| chapter_fmt | %s | chapter print format for seekbar-hover. `no` to disable |
119+
| tooltips_for_disabled_elements | yes | enables tooltips for disabled buttons and elements |
120+
| tooltip_hints | yes | enables text hints for the information, loop, ontop and screenshot buttons |
121+
| playpause_size | 30 | icon size for the play-pause button |
122+
| midbuttons_size | 24 | icon size for the middle buttons |
123+
| sidebuttons_size | 24 | icon size for the side buttons |
124+
| persistentprogress | no | always show a small progress line at the bottom of the screen |
125+
| persistentprogressheight | 17 | the height of the persistentprogress bar |
126+
| persistentbuffer | no | on web videos, show the buffer on the persistent progress line |
125127

126128
### UI [behavior]
127129

modernz.conf

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
## General
2+
# See https://github.com/Samillion/ModernZ/blob/main/docs/TRANSLATIONS.md for other languages
3+
language=en
24
# show mpv logo on idle
35
idlescreen=yes
46
# whether to show OSC window controls, "auto", "yes" or "no"
@@ -141,8 +143,10 @@ showwindowtitle=yes
141143
showwindowcontrols=yes
142144
# whether to make the title bar a singular bar instead of a black fade
143145
titleBarStrip=no
144-
# title above seekbar. ${media-title} or ${filename} (can use /no-ext)
146+
# title above seekbar
145147
title=${media-title}
148+
# title in windowcontrols
149+
windowcontrols_title=${media-title}
146150
# mpv-osd-symbols = default osc font (or the one set in mpv.conf)
147151
font=mpv-osd-symbols
148152
# the font size of the title text (above seekbar)

modernz.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ local utils = require "mp.utils"
1414
-- do not touch, change them in modernz.conf
1515
local user_opts = {
1616
-- General
17-
language = "en", -- For other langs: https://github.com/Samillion/ModernZ#osc-language
17+
language = "en", -- See https://github.com/Samillion/ModernZ/blob/main/docs/TRANSLATIONS.md for other languages
1818
idlescreen = true, -- show mpv logo on idle
1919
windowcontrols = "auto", -- whether to show OSC window controls, "auto", "yes" or "no"
2020
showwindowed = true, -- show OSC when windowed?
@@ -100,8 +100,8 @@ local user_opts = {
100100
showwindowcontrols = true, -- show window controls (close, min, max) in borderless/fullscreen
101101
show_chapter_title = true, -- show chapter title next to timestamp (below seekbar)
102102
titleBarStrip = false, -- whether to make the title bar a singular bar instead of a black fade
103-
title = "${media-title}", -- title above seekbar. ${media-title} or ${filename} (can use /no-ext)
104-
windowcontrols_title = "${media-title}", -- Same as title but for windowcontrols
103+
title = "${media-title}", -- title above seekbar
104+
windowcontrols_title = "${media-title}", -- title in windowcontrols
105105
font = "mpv-osd-symbols", -- mpv-osd-symbols = default osc font (or the one set in mpv.conf)
106106
titlefontsize = 30, -- the font size of the title text (above seekbar)
107107
chapter_fmt = "%s", -- chapter print format for seekbar-hover. "no" to disable

0 commit comments

Comments
 (0)