Updating
5.0 comes with some breaking changes.
Installation
Our directory structure has changed. If you're updating manually, you should delete uosc_shared
and uosc.lua
in your scripts
folder before installing 5.0, which is only a single uosc
folder now.
Alternatively, you can use one of the new install commands in readme, and it'll take care of that for you.
Config
A lot of config options have been added, changed, or removed and replaced with new ones that are more compact and provide more customization (color
, opacity
, ...).
I recommend just downloading the new uosc.conf
file and reconfiguring it again.
Highlights
Searchable menus
All menus in uosc are now searchable. Just start typing!
Though this disables the ability to toggle the menu with the same key, if the key is just a single letter. You can disable menu_type_to_search
option, and use ctrl+f
or /
to search instead.
For script developers: menu API now includes search related options, as well as on_search
callbacks for you to implement searching on your end.
Keybinds palette
A new command uosc/keybinds
now displays a command palette of all active key bindings. You can search through it to find commands/shortcuts, and what shortcut/commands they're bound to, and of course call it.
Self updating
A new command uosc/update
, which will make uosc re-install itself to update.
It's a bit tricky to make this work, and as a result doesn't work in all environments. See update
command documentation for details.
Menu titles & separators
When defining your own menus in input.conf
, there's now a new syntax for adding un-selectable titles and separators:
# #! Section > Title
# #! Section > ---
Localization
Localization has been added for: de
, es
, fr
, ro
, ru
, zh-hans
. Though not all are up to date.
To control which language you want to see we detect mpv's slang
config, but you can configure it with a more fine grained priority list with uosc's languages
option. See more in default uosc.conf
file.
Other noteworthy changes
Added idle and audio indicators (graphics/text in the middle of screen). All can be disabled with the new disable_elements
option.
Resetting by clicking on speed has been moved from primary to secondary click. This is to match the same behavior now also available on volume.
You can now control stuff like animation length (including disabling animations) and border radius with animation_duration
and border_radius
options.
Fixed touch input event handling.
API
If you're using uosc's API for creating menus for your scripts, there have been some changes. Your stuff still works, just a bit differently, and might need adjustments. Mainly:
- You no longer need to send
get-version
to detect uosc. This message is gone. uosc now instead sends a globaluosc-version <version>
message as the first thing while initializing, which you're probably already listening for. In practice, all you should need to do is just removeget-version
call from your script. - Implicit behavior of
menu-open
andmenu-update
was removed (menu-open
would toggle,menu-update
would open if not already), and there's nowmenu-close
command. To know when you should call close or update, you can checkmp.get_property_native('user-data/uosc/menu/type')
to see if any menu and of what type is currently open, with a fallback ofuosc-menu-type
property onmp.get_property_native('shared-script-properties')
for older mpv versions.
Changelog
Features
- Internationalization (#518) @natural-harmonia-gropius
- French translation (#521) @po5
- Spanish translation (#523) @po5
- Dynamic localization strings and caching @tomasklaen
add-intl-directory
APi for scripts to extend localization @tomasklaen- Romanian translation (#531) @po5
- German translation (#532) @christoph-heinrich
- Scroll to new position after moving item in menu (#552) @christoph-heinrich
- Menu items now accept
selectable
andalign
options @tomasklaen - Improved menu cursor navigation @tomasklaen
- Shuffle now prevents repeating same files often @tomasklaen
- Dropped compatibility for mpv 0.32 and below @tomasklaen
- Add russian translation (#597) @shvchk
- Fast seek in timeline based on cursor velocity @tomasklaen
- Open chapters menu when clicking on current chapter in title @tomasklaen
- Added background to tooltips (#621) @christoph-heinrich
- Initial support for updating options at runtime (#571) @christoph-heinrich
- Searchable menus (#625) @christoph-heinrich
- Search by first character of each word (#644) @christoph-heinrich
- Added
top_bar_flash_on
option @tomasklaen - Added
show_hidden_files
option @tomasklaen - Redesigned menu title & search input (#650) @tomasklaen
- Palette menus (#652) @tomasklaen
- [breaking] Menu script-message changes (#653) @christoph-heinrich
- Added
search_submenus
prop to menus (#655) @tomasklaen - Update german translation (#659) @christoph-heinrich
- Reworked timeline progress mode (#661) @tomasklaen
windowed
andfullscreen
added to available element persistency states @tomasklaeninputs
command to display a palette menu with all active keybindings (#665) @tomasklaen- [breaking] Reworked config options for fullscreen scale adjustments (#664) @tomasklaen
- Added
border_radius
option @tomasklaen - Improved menu title & hint clipping logic (#668) @christoph-heinrich
- [breaking] Reworked opacity options (#680) @tomasklaen
- Added
animation_factor
option to control animation speed @tomasklaen - Navigating menu with up/down/home/end keys is now instant with no animation @tomasklaen
- Added audio indicator for audio files without cover @tomasklaen
- Support for creating menu titles and separators in
input.conf
(#681) @tomasklaen - Changed
animation_factor
option toanimation_duration
@tomasklaen - Scripts to install or update uosc with a single command (#691) @tomasklaen
- Added
disable_elements
option anddisable-elements
script message (#695) @tomasklaen - Added idle indicator, and an ability to control indicator opacities @tomasklaen
- [breaking] Changed modifier to force open directory in file menus from
ctrl
toalt
@tomasklaen - Dynamic volume icon (#699) @dyphire
- [breaking] Reworked color options @tomasklaen
- Right click on volume or speed to reset them @tomasklaen
- Configurable background opacity for buffering indicator (#703) @christoph-heinrich
- Added
update
command to update uosc (#700) @tomasklaen - Removed
get-version
in favor of earlyuosc-version
broadcast (#714) @christoph-heinrich - Renamed
inputs
command tokeybinds
@tomasklaen - Improved
escape
andbackspace
behavior in menus (#719) @tomasklaen
Fixes
- Failing to detect macos platform (#513) @christoph-heinrich
- Language priority (#525) @natural-harmonia-gropius
en
locale not working (#526) @natural-harmonia-gropius- Translate audio channels and devices list (#520) @po5
- Take parameter values into account when caching translations @po5
- Use string type for all translation formatting @po5
- Update simplified chinese translation (#534) @natural-harmonia-gropius
- Translate topbar when no file (#533) @natural-harmonia-gropius
- Update spanish, french, romanian translations (#537) @po5
- Remove redundant menu title translation @tomasklaen
- Translate built-in menu titles (#539) @po5
- Translate fallback chapter title (#540) @po5
- Show empty placeholder for empty menus (#546) @natural-harmonia-gropius
- Take window_border_size into account for thumbnail positioning (#553) @po5
- Take window_border_size into account for tooltip positioning (#554) @po5
- Don't translate strings from
input.conf
@tomasklaen - Removed
add-intl-directory
API @tomasklaen - Window title click events preventing window dragging @tomasklaen
- Crash when opening a non blurred menu (#565) @christoph-heinrich
- Removed debugging leftovers @tomasklaen
- Menu back navigation resetting selected index @tomasklaen
- Crashes when dealing with invalid UTF-8 strings (#579) @christoph-heinrich
- Use
mp.get_script_directory()
instead of relative paths @tomasklaen - Crash when a script menu update renders selected index unavailable (#591) @po5
- Make the install procedure on linux use
XDG_CONFIG_HOME
(#595) @evantj - Error in matching pattern caused some files to be recognized as magnet links @tomasklaen
- Remove redundant symbol order from sorting algorithm (#608) @christoph-heinrich
- Stale (closed) menus triggering input events (#612) @tomasklaen
- Vertically misaligned number in playlist indicator @tomasklaen
- Crash when selecting "Empty" in chapters menu (#626) @christoph-heinrich
- Top bar enabled checks (#628) @christoph-heinrich
- Don't select not selectable items (#627) @christoph-heinrich
- Menu height and positioning (#629) @christoph-heinrich
- Crash when using wrong syntax for speed scale (#633) @christoph-heinrich
prev
commands now play previously played file even when shuffle is enabled @tomasklaen- Selected_index norm in reset_navigation() (#634) @christoph-heinrich
- Shuffle history couldn't go back more than once (#635) @tomasklaen
- Case insensitive menu search (#638) @christoph-heinrich
- Prepare for shared-script-properties removal (#640) @christoph-heinrich
- External search in menu (#642) @christoph-heinrich
- Stream quality selection (#641) @christoph-heinrich
- Adapt to the new
title-bar
state of mpv (#643) @dyphire - Render spaces at the end of the search query (#648) @christoph-heinrich
- Search not selecting 1st item in results (#651) @tomasklaen
search_suggestion
submitting externally handled searches @tomasklaen- Search backspace deleting unicode characters (#657) @christoph-heinrich
- Menu positioning and sizing polish (#654) @tomasklaen
- Update simplified chinese translation (#660) @dyphire
- Add
cue
to audio types (#662) @xfzv - Menu title and search not clipped properly in extremely tiny windows (#658) @christoph-heinrich
- Add
sbv
to subtitle types (#663) @dyphire - Progress line width broken in #661 @tomasklaen
- Window border enable logic for non windows (#676) @christoph-heinrich
search_submenus
inheritance, missing docs, andass_safe_title
cache not clearing @tomasklaen- Updating the menu while using the internal search (#677) @christoph-heinrich
- Volume slider crash when no audio (#678) @christoph-heinrich
user-data/uosc/menu/type
backwards compatibility, and being nil means closed (#673) @christoph-heinrich- Default items not cached when
input.conf
was empty @tomasklaen - Elements instantly disappearing instead of fading out on mouse leave @tomasklaen
- Updated german translation (#684) @christoph-heinrich
- Element fadeout bugs when cursor leaves/re-enters window @tomasklaen
- Hide audio indicator when displaying static pause indicator @tomasklaen
- No window border on older windows mpv versions @tomasklaen
- Update simplified chinese translation (#698) @dyphire
- Typo in cursor event binding @tomasklaen
- Division by zero when animating from and to same value @tomasklaen
- Position update before mbtn_left down handler (#705) @christoph-heinrich
- Render after menu fling (#707) @christoph-heinrich
- Use the preferred portable shebang in unix installer @tomasklaen
- Touch events firing before handlers are bound (#708) @christoph-heinrich
- Default colors not using correct format @tomasklaen
- Missing
delete-file-prev
command @tomasklaen - Update german translation (#701) @christoph-heinrich
Miscellaneous
- Correct typos in uosc.conf (#594) @felixonmars
- Changed license to LGPL-2.1 @tomasklaen
- Remove typo from cSpell.words @tomasklaen
Performance
Refactor
- Use local function where appropriate @tomasklaen
- Improved protocol matching patterns @tomasklaen
- Use cicular buffer for cursor.history @christoph-heinrich
- Use new velocity measurement for menu flings @christoph-heinrich
- Use
itable_has
for text wrapping (#646) @christoph-heinrich - Rename first_word_chars() to initials() (#649) @christoph-heinrich
- Mouse position initialization @tomasklaen
- Use math.huge (#692) @christoph-heinrich
- Use
comma_split
where appropriate @tomasklaen - Cursor event handling @tomasklaen
- Tween nan prevention @tomasklaen
- Various code reshuffling and renames @tomasklaen
Styling
- Reconfigured and run the whole codebase through lua formatter @tomasklaen
Testing
- Add chapter ranges pattern tests (#519) @christoph-heinrich
Build
- Improved install scripts @tomasklaen
- Fix config path used by MacOS installer @tomasklaen
Tweak
- Elements with min_visibility > 0.5 cause a margin (#508) @christoph-heinrich
- Include number in fallback edition title (#529) @po5
- Handle plural in audio track list (#530) @po5
- Remove text shadow in menu (#679) @christoph-heinrich
- Prevent dynamic volume icon from shifting horizontally @tomasklaen
- Bumped curtain brightness and opacity to prevent menus blending into background @tomasklaen
- Transparent outline for full volume icon (#704) @christoph-heinrich
- Made tooltips & thumbnail in timeline use same gaps both horizontally and vertically @tomasklaen
- Removed
paused
from defaulttimeline_persistency
@tomasklaen
Full Changelog: 4.7.0...5.0.0