fix: remove obsolete options, add persistency to controls, update conf file

This commit is contained in:
tomasklaen
2022-09-07 08:46:42 +02:00
parent fa1b2112ec
commit b6d45e5bd7
2 changed files with 44 additions and 48 deletions

View File

@@ -1,33 +1,33 @@
# display style of current position. available: line, bar # Display style of current position. available: line, bar
timeline_style=line timeline_style=line
# line display style config # Line display style config
timeline_line_width=2 timeline_line_width=2
timeline_line_width_fullscreen=3 timeline_line_width_fullscreen=3
# scale the width of the line when minimized (timeline_size_min) # Scale the width of the line when minimized (timeline_size_min)
timeline_line_width_minimized_scale=10 timeline_line_width_minimized_scale=10
# timeline size when minimized, 0 will hide it completely # Timeline size when minimized, 0 will hide it completely
timeline_size_min=2 timeline_size_min=2
# timeline size when fully expanded, in pixels, 0 to disable # Timeline size when fully expanded, in pixels, 0 to disable
timeline_size_max=40 timeline_size_max=40
# same as ^ but when in fullscreen # Same as ^ but when in fullscreen
timeline_size_min_fullscreen=0 timeline_size_min_fullscreen=0
timeline_size_max_fullscreen=60 timeline_size_max_fullscreen=60
# same thing as calling toggle-progress command once on startup # Same thing as calling toggle-progress command once on startup
timeline_start_hidden=no timeline_start_hidden=no
# comma separated states when timeline should always be visible. available: paused, audio, image, video # Comma separated states when timeline should always be visible. available: paused, audio, image, video
timeline_persistency= timeline_persistency=
# timeline opacity # Timeline opacity
timeline_opacity=0.9 timeline_opacity=0.9
# top border of background color to help visually separate timeline from video # Top border of background color to help visually separate timeline from video
timeline_border=1 timeline_border=1
# when scrolling above timeline, wheel will seek by this amount of seconds # When scrolling above timeline, wheel will seek by this amount of seconds
timeline_step=5 timeline_step=5
# display seekable buffered ranges for streaming videos, syntax `color:opacity`, # Display seekable buffered ranges for streaming videos, syntax `color:opacity`,
# color is an BBGGRR hex code, set to `none` to disable # color is an BBGGRR hex code, set to `none` to disable.
timeline_cached_ranges=4e845c:0.5 timeline_cached_ranges=4e845c:0.5
# floating number font scale adjustment # Floating number font scale adjustment
timeline_font_scale=1 timeline_font_scale=1
# timeline chapters style: never, dots, lines, lines-top, lines-bottom # Timeline chapters style: never, dots, lines, lines-top, lines-bottom
timeline_chapters=dots timeline_chapters=dots
timeline_chapters_opacity=0.2 timeline_chapters_opacity=0.2
timeline_chapters_width=6 timeline_chapters_width=6
@@ -77,8 +77,9 @@ controls_size=32
controls_size_fullscreen=40 controls_size_fullscreen=40
controls_margin=8 controls_margin=8
controls_spacing=2 controls_spacing=2
controls_persistency=
# where to display volume controls: none, left, right # Where to display volume controls: none, left, right
volume=right volume=right
volume_size=40 volume_size=40
volume_size_fullscreen=60 volume_size_fullscreen=60
@@ -88,17 +89,14 @@ volume_border=1
volume_step=1 volume_step=1
volume_font_scale=1 volume_font_scale=1
# playback speed widget: mouse drag or wheel to change, click to reset # Playback speed widget: mouse drag or wheel to change, click to reset
speed=no
speed_size=46
speed_size_fullscreen=68
speed_persistency= speed_persistency=
speed_opacity=1 speed_opacity=1
speed_step=0.1 speed_step=0.1
speed_step_is_factor=no speed_step_is_factor=no
speed_font_scale=1 speed_font_scale=1
# controls all menus, such as context menu, subtitle loader/selector, etc # Controls all menus, such as context menu, subtitle loader/selector, etc
menu_item_height=36 menu_item_height=36
menu_item_height_fullscreen=50 menu_item_height_fullscreen=50
menu_min_width=260 menu_min_width=260
@@ -109,8 +107,8 @@ menu_opacity=0.8
menu_parent_opacity=0.4 menu_parent_opacity=0.4
menu_font_scale=1 menu_font_scale=1
# top bar with window controls and media title # Top bar with window controls and media title
# can be: never, no-border, always # Can be: never, no-border, always
top_bar=no-border top_bar=no-border
top_bar_size=40 top_bar_size=40
top_bar_size_fullscreen=46 top_bar_size_fullscreen=46
@@ -118,17 +116,17 @@ top_bar_persistency=
top_bar_controls=yes top_bar_controls=yes
top_bar_title=yes top_bar_title=yes
# window border drawn in no-border mode # Window border drawn in no-border mode
window_border_size=1 window_border_size=1
window_border_opacity=0.8 window_border_opacity=0.8
# scale the interface by this factor # Scale the interface by this factor
ui_scale=1 ui_scale=1
# pause video on clicks shorter than this number of milliseconds, 0 to disable # Pause video on clicks shorter than this number of milliseconds, 0 to disable
pause_on_click_shorter_than=0 pause_on_click_shorter_than=0
# flash duration in milliseconds used by `flash-{element}` commands # Flash duration in milliseconds used by `flash-{element}` commands
flash_duration=1000 flash_duration=1000
# distances in pixels below which elements are fully faded in/out # Distances in pixels below which elements are fully faded in/out
proximity_in=40 proximity_in=40
proximity_out=120 proximity_out=120
# BBGGRR - BLUE GREEN RED hex color codes # BBGGRR - BLUE GREEN RED hex color codes
@@ -136,31 +134,31 @@ color_foreground=ffffff
color_foreground_text=000000 color_foreground_text=000000
color_background=000000 color_background=000000
color_background_text=ffffff color_background_text=ffffff
# use bold font weight throughout the whole UI # Use bold font weight throughout the whole UI
font_bold=no font_bold=no
# show total time instead of time remaining # Show total time instead of time remaining
total_time=no total_time=no
# display sub second fraction in timestamps up to this precision # Display sub second fraction in timestamps up to this precision
time_precision=0 time_precision=0
# hide UI when mpv autohides the cursor # Hide UI when mpv autohides the cursor
autohide=no autohide=no
# can be: none, flash, static, manual (controlled by flash-pause-indicator and decide-pause-indicator commands) # Can be: none, flash, static, manual (controlled by flash-pause-indicator and decide-pause-indicator commands)
pause_indicator=flash pause_indicator=flash
# screen dim when stuff like menu is open, 0 to disable # Screen dim when stuff like menu is open, 0 to disable
curtain_opacity=0.5 curtain_opacity=0.5
# sizes to list in stream quality menu # Sizes to list in stream quality menu
stream_quality_options=4320,2160,1440,1080,720,480,360,240,144 stream_quality_options=4320,2160,1440,1080,720,480,360,240,144
# load first file when calling next on a last file in a directory and vice versa # Load first file when calling next on a last file in a directory and vice versa
directory_navigation_loops=no directory_navigation_loops=no
# file types to look for when navigating media files # File types to look for when navigating media files
media_types=3gp,avi,bmp,flac,flv,gif,h264,h265,jpeg,jpg,m4a,m4v,mid,midi,mkv,mov,mp3,mp4,mp4a,mp4v,mpeg,mpg,oga,ogg,ogm,ogv,opus,png,rmvb,svg,tif,tiff,wav,weba,webm,webp,wma,wmv media_types=3gp,avi,bmp,flac,flv,gif,h264,h265,jpeg,jpg,m4a,m4v,mid,midi,mkv,mov,mp3,mp4,mp4a,mp4v,mpeg,mpg,oga,ogg,ogm,ogv,opus,png,rmvb,svg,tif,tiff,wav,weba,webm,webp,wma,wmv
# file types to look for when loading external subtitles # File types to look for when loading external subtitles
subtitle_types=aqt,gsub,jss,sub,ttxt,pjs,psb,rt,smi,slt,ssf,srt,ssa,ass,usf,idx,vt subtitle_types=aqt,gsub,jss,sub,ttxt,pjs,psb,rt,smi,slt,ssf,srt,ssa,ass,usf,idx,vt
# used to approximate text width # Used to approximate text width
# if you are using some wide font and see a lot of right side clipping in menus, # If you are using some wide font and see a lot of right side clipping in menus,
# try bumping this up # try bumping this up.
font_height_to_letter_width_ratio=0.5 font_height_to_letter_width_ratio=0.5
# default open-file menu directory # Default open-file menu directory
default_directory=~/ default_directory=~/
# `chapter_ranges` lets you transform chapter indicators into range indicators. # `chapter_ranges` lets you transform chapter indicators into range indicators.

View File

@@ -26,7 +26,7 @@ local options = {
timeline_size_min_fullscreen = 0, timeline_size_min_fullscreen = 0,
timeline_size_max_fullscreen = 60, timeline_size_max_fullscreen = 60,
timeline_start_hidden = false, timeline_start_hidden = false,
timeline_persistency = '', timeline_persistency = 'paused',
timeline_opacity = 0.9, timeline_opacity = 0.9,
timeline_border = 1, timeline_border = 1,
timeline_step = 5, timeline_step = 5,
@@ -41,6 +41,7 @@ local options = {
controls_size_fullscreen = 40, controls_size_fullscreen = 40,
controls_margin = 8, controls_margin = 8,
controls_spacing = 2, controls_spacing = 2,
controls_persistency = '',
volume = 'right', volume = 'right',
volume_size = 40, volume_size = 40,
@@ -51,9 +52,6 @@ local options = {
volume_step = 1, volume_step = 1,
volume_font_scale = 1, volume_font_scale = 1,
speed = false,
speed_size = 46,
speed_size_fullscreen = 60,
speed_persistency = '', speed_persistency = '',
speed_opacity = 1, speed_opacity = 1,
speed_step = 0.1, speed_step = 0.1,
@@ -875,7 +873,7 @@ function Element:init() end
function Element:destroy() end function Element:destroy() end
-- Decide effective proximity based on various external factors -- Decide elements visibility based on proximity and various other factors
function Element:get_visibility() function Element:get_visibility()
-- Hide when menu is open, unless this is a menu -- Hide when menu is open, unless this is a menu
---@diagnostic disable-next-line: undefined-global ---@diagnostic disable-next-line: undefined-global
@@ -3714,7 +3712,7 @@ options.timeline_cached_ranges = (function()
local parts = split(options.timeline_cached_ranges, ':') local parts = split(options.timeline_cached_ranges, ':')
return parts[1] and {color = parts[1], opacity = tonumber(parts[2])} or nil return parts[1] and {color = parts[1], opacity = tonumber(parts[2])} or nil
end)() end)()
for _, name in ipairs({'timeline', 'volume', 'top_bar', 'speed'}) do for _, name in ipairs({'timeline', 'controls', 'volume', 'top_bar', 'speed'}) do
local option_name = name .. '_persistency' local option_name = name .. '_persistency'
local flags = {} local flags = {}
for _, state in ipairs(split(options[option_name], ' *, *')) do for _, state in ipairs(split(options[option_name], ' *, *')) do