Skip to content

Conversation

eugenesvk
Copy link

In my fork I've made a few improvements listed below, so opening this PR in case you'd like to incorporate them into your repo as well:

  • moved everything to a single folder for cleaner organization (this also allows changing the load order and load scripts that depend on previous scripts to later)
  • added explicit profiles mpvi in both mpv.conf and and input.conf to allow people to just copy&paste configs to their own profiles
  • converted configs to a more ergonomic syntax-highlighted YAML (though an older version due to lua's outdated libraries) that also allows tabular formatting with comments and doesn't bug if you add a space before =
  • added the more ergonomic OKHSL/OKHSV and HSL/HSV color spaces instead of the ugly hex with reverted(!) BGR instead of RGB
  • tweaked input formatting of other values to remove the need to add , in 92,92, a space is fine (though it should be flexible and auto-detect , as well)
  • also added the option to change OSD colors in the same more ergonomic color way in the status line configs
  • added a limit on how much the pic can go outside (so you can't move the pic further if it's already invisible, so even spamming a movement key won't move the image too far outside the viewing area)
  • fixed align-border not fully aligned on smaller pics #26
  • fixed osd-dimensions seems to not get loaded in time for align_border #25
  • and maybe a few more tweaks (changed a few default colors while testing, added a few more movement keybinds)

Valid OSD means not only that 'OSD-dimensions' property returns a table,
but also that the values of this table are non-0
Avoids conflicts with other script within the same folder since it provides unique IDs
Avoids conflicts with other script within the same folder since it provides unique IDs
Avoids conflicts with other script within the same folder since it provides unique IDs
it sends messages to other scripts, so better load those earlier
Still not 100% correct as window scaling may emit two OSD property change events, so we trigger alignment on 2 non-zero OSD calls
BUT: we can't differentiate whether this was auto-scaling-call on launch or a valid user call, so user's first manual alignment might get overriden by this fix
Allows to set these in a better color space vs the default hex
reformat to tabular view
add more image movement commands
@Asinin3
Copy link

Asinin3 commented May 7, 2025

How do you use this? I cant work out how to trigger MPVI to load for a video Cant see a keybind in the config that toggles it on/off. Tried resorting to just using your individual image position LUA since thats all I wanted and wanted to see if it fixed issues I had but it seems to not work if you try them individually without changes which IMO is worse than just keeping them all separated like they are currently. I get the convenience of profiles but there will likely be others like me who just wanted to grab one part of a script and use it without having to modify anything other than keybinds

@eugenesvk
Copy link
Author

eugenesvk commented May 7, 2025

not sure I understand it, this is an image viewer, why are you trying to load for a video?
And profiles aren't related to keeping files separated, nothing prevents separate files from depending on other files, so you still wouldn't be able to "just pick one"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

align-border not fully aligned on smaller pics osd-dimensions seems to not get loaded in time for align_border

2 participants