Commit Graph

1373 Commits

Author SHA1 Message Date
arch1t3cht 20ec48b717 menu.conf: make quit-watch-later item name more user-friendly
The name "Quit watch later" is hard to understand for users that don't
already know about the quit-watch-later command.

For what it's worth, this does also have some downsides:

1. It makes the context menu even wider, since "Quit watch later" was
   already the longest option.
2. The meaning of the "Open > Watch later" option may now be slightly
   less obvious to users. But this option does not work by default
   anyway, so the user will need to read the manual either way before
   using this option.

But these are fairly minor issues.
2026-06-04 00:16:54 +02:00
Guido Cella 8674222927 input.conf: make rotate keybindings repeatable
Needed because --video-rotate is OPT_CHOICE.
2026-05-10 20:46:31 +02:00
Kacper Michajłow c0c7584342 etc/builtin.conf: change gui mode to idle=yes
It is more expected from GUI application to stay open, even after
playback. Additionally this gives user a chance to inspect possible load
failures, while previously mpv would disappear.
2026-05-01 11:42:04 +02:00
Guido Cella ae3189567b select.lua: add select-secondary-subtitle-line
Requested in https://github.com/mpv-player/mpv/pull/17730#issuecomment-4321224996
2026-04-26 08:55:42 +02:00
Guido Cella e0f54adf08 menu.conf: add OSC layout selection
Make this feature discoverable.
2026-04-17 18:34:24 +02:00
Thomas Lange 7ac022c834 mpv.metainfo.xml: Update screenshot URL
The previous URL causes a "404 - Not Found" error meanwhile.
2026-04-15 15:19:50 +00:00
Guido Cella 1a545faf28 menu.conf: don't check Hardware decoding with no video track 2026-03-25 13:44:44 +01:00
nanahi 3a8a908641 menu.conf: use update-clipboard command
This command is now required when the default has no clipboard monitoring.
2026-03-21 16:05:36 +01:00
nanahi bf054a8357 input.conf: use update-clipboard command
This command is now required when the default has no clipboard monitoring.
2026-03-21 16:05:36 +01:00
nanahi 10ed4716a7 etc/restore-old-bindings.conf: add changed bindings
Changed in: 7bfa2cfd3d,
8da6e8ad55
2026-03-05 19:14:55 +01:00
Guido Cella 3ec435dbee menu.conf: add a Reload menu item 2026-02-27 09:24:53 +01:00
Guido Cella 06259d1a0b input.conf: bind Ctrl+r to reload the current file
Because how to do this has been asked more than 10 times in #mpv, bind
it by default.
2026-02-27 09:24:53 +01:00
Guido Cella ea82915ba7 menu.conf: change duplicate hints
Deduplicate:
Op&en and &Editions/Titles
&Quit and &Quit watch later
2026-02-03 21:05:38 +01:00
Guido Cella d1743b641b menu.conf: change duplicate hints
Deduplicate:
&Properties and Copy &path
C&enter and D&einterlace
&Speed and &Shuffle
2026-01-26 11:47:16 +01:00
Guido Cella eadba4469f menu.conf: add open-chat to the context menu 2026-01-26 11:11:38 +01:00
Guido Cella 7bfa2cfd3d input.conf: add context menu bindings
Rebind MENU to show the context menu. Shift+F10 is also bound because it
is a standard context menu binding.

MENU is not added to restore-old-bindings.conf because it is uncommon.
2026-01-25 20:56:42 +01:00
Guido Cella f4b37b6455 select.lua: populate the context menu
Make select.lua parse menu.conf on the first vo-configured and fill
menu-data with the properties referenced in menu.conf change. This is
disabled in the libmpv profile.

This is done from select.lua to reuse functions to format the data and
retrieve key bindings.

There is also a script-binding that opens the correct context menu
depending on --load-context-menu.

While the context menu is scrollable, for the playlist it is better to
start from around the current entry rather than from the beginning, and
since menu-data has no way to specify where to start, when there are
more than 25 items playlist items this adds … entries that open the
scrollable console menu when clicked.

input-bindings is parsed to show the shortcuts bound to commands. Since
it is not observable, it just uses the bindings from the first time the
context menu is opened.

Multimedia and numpad keys are also not shown to reduce clutter.

The old Context Menu section of the docs is merged in the more detailed
context_menu.rst to not repeat the same information.
2026-01-25 20:56:42 +01:00
Guido Cella 19adc2d509 menu.conf: add this file
Add a default context menu definition in etc/menu.conf. It will be used
to populate the context menu.

The format is meant to be easily readable with just tabs as separators
and submenus denoted by indentation. It avoids complicating the builtin
input.conf like similar scripts do.

By not defining the shortcut keys in the builtin input.conf, menu
entries won't be associated to wrong shortcuts when the user's
input.conf changes key bindings without redefining the menu. Note that
external scripts don't have this issue.

I used 3+ spaces as separators at first but then realized that since we
have Windows users tabs will look better in editors with proportional
fonts like notepad, though it still won't be perfectly aligned depending
on the font. But I am still not sure what is better.

On a curious note, etc/menu.conf already existed in the past as mplayer
used to have a menu. git log -p etc/menu.conf will show commits from
2002 to 2011.
2026-01-25 20:56:42 +01:00
Guido Cella 7e38052138 input.conf: format some commands more consistently
The formatting of input.conf commands is totally inconsistent. At least
for the commands that will be used in the context menu, make it
consistent. The next commit will define the context menu commands, and
the keys bound to these commands will be shown in the menu only when
they match exactly, so this avoids copy pasting commands with
inconsistent formatting just to make them match.
2026-01-25 20:56:42 +01:00
Kacper Michajłow 6e54aa328d builtin.conf: enable antiringing in high quality profile
General consensus is that ortho scalers antiring while fast is not that
good, let's use it in high-quality profile only.
2026-01-22 00:10:48 +01:00
Guido Cella 4614dd6859 etc/mpv.conf: replace the --sharpen example
gpu-next doesn't support --sharpen and it is now the default VO, so
replace it with something that actually works.
2025-11-30 14:21:28 +01:00
Guido Cella 8406834075 context_menu.lua: add this script
This implements a ASS context menu to be used on platforms other than
Windows.

The select script message will allow selecting an item with a single
click when releasing a mouse button, like in native context menus. This
is mainly useful to cycle pause with one click.
2025-09-15 04:12:57 +02:00
Kacper Michajłow 7ee677c773 meson: add mpv-register and mpv-unregister helpers on Windows
They call `--register` / ``--unregister` for users who don't want to open
console and do it manually, this is one-click solution.
2025-09-15 03:47:35 +02:00
Dudemanguy 08d7d049d1 build: install encoding-profiles.conf into the system data directory
fd4e3af740 originally started installing
it, and we've been doing it ever since then. The value of having all of
these encoding profiles predefined by default is pretty dubious since a
lot of them are pretty old ('MP4 for Nokia N900' being a shining
example) and mpv is not really a good encoding tool anyways. Let's treat
it like the other conf files in etc and install it in the data directory
for reference. If someone really uses these, they can copy the file over
locally to their mpv config directory and it'll still work fine.
2025-07-12 14:01:54 +00:00
Kacper Michajłow 8e4493b4a2 Revert "input.conf: bind MBTN_MID to align-to-cursor"
It can be too easy to change the video position without a single way to
undo the change. Also, this is mostly useful for images. Binding can be
brought back in a better way with an image profile or another method
that is more resistant to accidental clicks.

This reverts commit e98d3b62ec.
2025-03-23 22:49:00 +01:00
Guido Cella 0b3cc3a167 commands.lua: split this script out of console.lua
It was suggested by CogentRedTester in
https://github.com/mpv-player/mpv/pull/10282#issuecomment-1858727729 and
https://github.com/mpv-player/mpv/pull/10282#issuecomment-1858809580 and
by avih that making running commands an mp.input client is a better
architecture.

A practical advantage is that completions are calculated in a different
thread, which prevents hanging when completing slow/network filesystems.

script-binding console/enable becomes script-binding commands/open,
though the console one is kept as an alias. I took the opportunity to
rename this because open makes more sense for a graphical modal, and it
is the word used in mp.input and user-data.

script-message-to console type becomes script-message-to commands type,
though the console one is kept as an alias. It is also changed to
automatically close on submit without having to append '; keypress ESC'
as you don't need to keep the console open after running prefilled
commands.

Also convert to double quotes like other scripts and rename some
inconsistent functions.
2025-03-08 19:09:23 +00:00
Jaime Marquínez Ferrándiz 561156217e fish-completion: create the fish completion script
It is an adaptation of the bash completion.
2025-03-08 00:25:45 +01:00
Kacper Michajłow 93ea3df0a9 player: add mpv:// protocol
This is useful to run mpv from URL handler. Can be used to start mpv
from you web browser or anything that would trigger url handler for
given protocol. Only safe protocols are allowed.

Current solutions to run mpv in such context are to spawn IPC proxy and
run mpv when requested, but this is in most cases not necessary.

Currently the protocol is added in mpv.desktop. Windows related
registration will follow in future changes.
2025-03-07 00:15:23 +01:00
Kacper Michajłow 27f39811fa etc/mpv.desktop: update safe protocol list 2025-03-07 00:15:23 +01:00
Guido Cella e98d3b62ec input.conf: bind MBTN_MID to align-to-cursor 2025-02-24 15:53:34 +01:00
Guido Cella f1f6184025 input.conf: bind Ctrl+left click to drag-to-pan
An alternative is to bind to right click only for images, but since we
will likely bind right click to the context menu once it works on
platforms other than Windows, bind to ctrl+left click to not have to
change it later.
2025-02-24 15:53:34 +01:00
Guido Cella 8da6e8ad55 input.conf: bind Ctrl+wheel to cursor-centric-zoom
Probably not worth adding to etc/restore-old-bindings.conf since it's an
extension of add video-zoom.
2025-02-24 15:53:34 +01:00
Guido Cella 9422a85638 input.conf: make Alt+BS reset --video-align-{x,y}
This is useful because positioning.lua uses video-align.
2025-02-24 15:53:34 +01:00
Guido Cella f0b4f3340f input.conf: make Alt+BS print "video-zoom: 0"
Alt+BS prints "video-pan-y: 0" which seems arbitrary. Make it print
video-zoom: 0 which is the most important property that gets reset.
2025-02-24 15:53:34 +01:00
Guido Cella e32beaa0db input.conf: bind Shift+{HOME,END} to go to the first and last file 2025-02-20 15:54:11 +00:00
Guido Cella 036528d44d input.conf: bind HOME to seek to the beginning 2025-02-20 15:54:11 +00:00
nanahi 02199aeb3f input.conf: use no instead of -1 for video-aspect-override 2025-02-18 23:05:02 +00:00
Kacper Michajłow 5e3f8d336d input.conf: add ctrl+p and g-m keybind for menu
Many keyboards doesn't even have MENU key and ctrl+p is common keybind
for command style menus like this one.
2025-02-17 22:54:04 +01:00
Kacper Michajłow 3baa255d47 builtin.conf: set menu corner_radius to 0 in box profile
OSD mesages are floating in exactly the same way as menu, they should be
consistent.
2025-02-17 22:54:04 +01:00
Dudemanguy d7159e4662 vd_lavc: make auto the same as auto-safe and introduce auto-unsafe
Users basically never need --hwdec=auto in reality and sometimes it
bites them unexpectedly (e.g. #15814). Unfortunately the name is kind of
nice sounding and if you don't read the manual closely, you might
inadvertently end up using it. So just make auto the same as auto-safe.
auto-unsafe is introduced to have the old behavior of auto instead. A
similar thing is done with the -copy variants. Try to update the
documentation of this section a little bit and discourage people from
using auto-unsafe because it's kind of dumb.
2025-02-17 16:32:37 +00:00
nanahi 5809d4d1bc etc/restore-osc-bindings.conf: add previously unbound actions
This makes sure that newly added actions do nothing, like before.
2025-02-16 01:01:49 +00:00
Guido Cella 3e0b3373df select.lua: add a miscellaneous menu 2025-01-27 21:06:50 +01:00
Guido Cella e2090533cf select.lua: select from the watch history with g-h
Implement selection of the entries in the watch history.

The last entry in the selector deletes the history file.
2025-01-27 18:53:28 +01:00
Guido Cella 7a59a12b76 select.lua: select files with watch later files with g-w
Implement selection of files to resume playing from watch later config
files. Requires --write-filename-in-watch-later-config.
2025-01-05 23:21:50 +01:00
Guido Cella d84e1b3582 stats.lua: inherit --osd-shadow-offset
Unlike font and border sizes, the default stats shadow offset is 0 like
--osd-shadow-offset, so it can be inherited from it by default to not
make users configure it in 2 places.

Since 0 and negative numbers are valid offsets, use infinity as the
placeholder for unconfigured values.
2025-01-04 20:07:49 +01:00
Kacper Michajłow 96da0cbcbd options: remove the player argument from --media-controls
It is now handled internally by the libmpv profile.

Since `player` was the default option, the impact should be minimal, as it
is uncommon to override the default option with the same value.
yes/no args will function the same way as before this commit.
2025-01-04 15:16:40 +01:00
Guido Cella fab8848d7d sub/osd: default to a semitransparent black back color
By default OSD and subs have no shadow, but if you do set a
--osd/sub-shadow-offset, the current default white shadow color looks
bad around white text with black border. Default to semitransparent
black instead. Use the same color box profiles were using to allow
removing it from there.
2025-01-03 12:18:03 +01:00
Guido Cella 753e206d5c zsh-completion: complete av://lavfi:testsrc and av://lavfi:sine
It is annoying to type these over and over.
2024-12-28 16:48:48 +00:00
Guido Cella a0f8d27aba input.conf: bind Ctrl+v to play the path in the clipboard 2024-12-28 14:08:32 +01:00
nanahi 298c178f1e input.conf: use capital letters instead of shift modifiers
Follow the suggestion of keyname documentation.

Fixes: b4d9980870
2024-12-20 14:54:35 +00:00