Commit Graph

22 Commits

Author SHA1 Message Date
Tomas Klaen
b800aebeff feat!: reworked opacity options (#680)
These options have been removed:

```
timeline_opacity
timeline_chapters_opacity
volume_opacity
speed_opacity
menu_opacity
menu_parent_opacity
top_bar_title_opacity
window_border_opacity
curtain_opacity
```

and replaced with one comma delimited `opacity` list to override all of the above and some new default opacity values.

Example:

```
opacity=timeline=0.5,title=0.5
```

List of opacity values available for override and their current defaults:

```
timeline=.9
position=1     # timeline progress or line
chapters=0.8
slider=0.9     # background of all sliders, such as volume
slider_gauge=1 # value bar of all sliders
speed=0.6
menu=1
submenu=0.4
border=1       # window border
title=1        # window title
tooltip=1      # tooltip background
thumbnail=1    # thumbnail border
curtain=0.5
```

closes #584, closes #636, closes #675
2023-10-08 11:59:56 +02:00
tomasklaen
a4ac44a7dc feat: added border_radius option
closes #377
2023-10-06 23:24:20 +02:00
Tomas Klaen
d2febcbd47 feat!: reworked config options for fullscreen scale adjustments (#664)
* feat!: reworked config options for fullscreen scale adjustments

Removed options:

```
timeline_size_fullscreen
controls_size_fullscreen
volume_size_fullscreen
menu_item_height_fullscreen
menu_min_width_fullscreen
top_bar_size_fullscreen
```

Additionally, `ui_scale` has been renamed to `scale`.

The scaling can now be controlled by these two new options:

```
scale=1
scale_fullscreen=1.3
```

closes #543
2023-10-06 23:20:14 +02:00
Tomas Klaen
473278c4bd feat: inputs command to display a palette menu with all active keybindings (#665) 2023-10-06 11:12:38 +02:00
Tomas Klaen
7f9a8cae6d feat: reworked timeline progress mode (#661)
* feat: reworked timeline progress mode

Config options:

```
timeline_line_width_fullscreen=3
timeline_line_width_minimized_scale=10
timeline_size_min=2
timeline_size_max=40
timeline_size_min_fullscreen=0
timeline_size_max_fullscreen=60
timeline_start_hidden=no
```

have been replaced with:

```
timeline_size=40
timeline_size_fullscreen=60
progress=windowed
progress_size=2
progress_line_width=20
```

This simplifies stuff a bunch, and enables timeline's progress mode to be togglable at all times. Previously you could only toggle when it was configured to be visible in current context.

closes #630
2023-10-03 11:10:50 +02:00
dyphire
a0c544a4ba fix: add sbv to subtitle types (#663) 2023-10-02 17:54:09 +02:00
xfzv
5bf81228db fix: add cue to audio types (#662) 2023-10-02 15:44:11 +02:00
christoph-heinrich
512281ac4b feat(api)!: menu script-message changes (#653)
- `open-menu` now only opens the menu, while closing any existing one first, even if it has the same `type`.
- `update-menu` will only update a currently opened menu of the same type. If no menu is open, or current menu's type is different, it doesn't do anything.
- `close-menu [type]` can be used to close any currently opened menu when called without a `[type]` argument, or only a menu of `[type]` type.
- uosc now keeps track of a currently opened menu type on the `user-data/uosc/menu/type` property, accessible via `mp.get_property_native('user-data/uosc/menu/type')`. This property is `nil` if no uosc menu is opened.

This is to achieve a predictable and granular control of menus with no implicit magic going on in the background.

The main difference is that `open-menu` can no longer be used to toggle the menu. You have to implement toggling manually by calling `open-menu` or `close-menu [type]` when appropriate. You can check if your menu is still opened either by getting or observing the `user-data/uosc/menu/type` property, or using the `on_close` menu callback.
2023-09-30 17:11:37 +02:00
tomasklaen
3766f583ae feat: added show_hidden_files option
This is currently limited to Mac & Linux only, since on Windows we have no way of telling a file is hidden (`file_info()` doesn't expose this information).

closes #647
2023-09-24 15:14:58 +02:00
tomasklaen
fec33b73f3 feat: added top_bar_flash_on option
closes #639
2023-09-24 14:41:21 +02:00
dyphire
442967b73b fix: adapt to the new title-bar state of mpv (#643)
mpv has added a new option to control window title bar state,
which requires relevant adjustments to be added in uosc
2023-09-23 23:17:17 +02:00
christoph-heinrich
9628d32937 fix: stream quality selection (#641)
Due to a recent change in mpv writing to playlist-pos doesn't restart
playback anymore, which was necessary for the format change to work for
the current file.
4b2276b730
2023-09-22 14:28:08 +02:00
christoph-heinrich
22d45b6c3b fix: prepare for shared-script-properties removal (#640)
mpv is about to remove `shared-script-properties`, which will cause
`utils.shared_script_property_set` to be nil.
Check for it's existence before calling it.
2023-09-22 11:41:25 +02:00
christoph-heinrich
18adf90af6 feat: searchable menus (#625)
* feat: make the menu searchable

Each menu/submenu can have a `on_search` and `search_debounce`.
`search_debounce` supports the special value 'submit' with which
searches only get executed upon pressing ctrl+enter.

Without a `on_search` an internal search implementation gets used.

The internal search has it's own menu update function that is needed to
keep the same menu item objects around because otherwise updates to
children get discarded when the parent search gets updated.

* feat: add `menu_type_to_search` option

Always listening to text breaks toggling the menu via a single keybind.
Add an option so users can choose to manually activate the search.
2023-09-21 10:28:43 +02:00
Tomas Klaen
7a4d687864 fix: shuffle history couldn't go back more than once (#635)
* fix: shuffle history couldn't go back more than once

ref #631

---------

Co-authored-by: christoph-heinrich <christoph-heinrich@users.noreply.github.com>
2023-09-21 10:27:21 +02:00
christoph-heinrich
8fe748c4d2 feat: initial support for updating options at runtime (#571)
Options can be changed during runtime by changing `script-opts`.
So far such option changes were simply ignored.
Now most options work, and the rest can be implemented when the needed.
2023-09-18 11:13:48 +02:00
Christoph Heinrich
3f21df1a9d refactor: use cicular buffer for cursor.history
Circular buffers are more efficient then moving the entries around.

Cursor velocity is now calculated on the fly, with from the current
cursor position and time as well a cursor position that is either
the youngest sample >100ms old, or the oldest sample in the buffer,
which is 10 elements in size. Restricting the sample selection based on
time prevents the filter window from becomming too long in case of
setups with low cursor update frequency, while still bring more
responsive velocity measurements to systems with higher cursor update
frequencies.

Removed the timer for exact seeking after fast seeks, as fast/exact
seeks can now be controlled with cursor speed and thus there is no need
for this anymore.
2023-08-25 09:13:45 +02:00
tomasklaen
776ca17f66 feat: fast seek in timeline based on cursor velocity 2023-08-25 09:13:45 +02:00
tomasklaen
68b5b2aaed refactor: improved protocol matching patterns
ref #605
2023-08-16 12:52:07 +02:00
tomasklaen
ade1d1f319 feat: dropped compatibility for mpv 0.32 and below
closes #359
2023-07-18 18:21:00 +02:00
tomasklaen
4399904bba refactor: change directory structure to support mpv 0.32 and lower 2022-10-27 12:09:59 +02:00
tomasklaen
c00e296953 refactor: modularize the codebase
Splits the monolith file into individual modules with as little code refactoring as possible.

Not too happy with it, mainly because of the weird language server behavior where it doesn't recognize types or variables unless the files defining them are open...

It'd also be better to refactor everything from the ground up to not depend on global variables but if I had that much time to invest I'd straight up just rewrite everything in typescript and use TS→Lua transpiler.
2022-10-25 12:14:50 +02:00