7 Commits

Author SHA1 Message Date
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
der richter f93df58a8e osxbundle: add new macOS 26 compatible App icon
generated with the Icon Composer project:

actool ./icon.icon \
  --compile ./ \
  --app-icon icon \
  --enable-on-demand-resources NO \
  --development-region en \
  --target-device mac \
  --platform macosx \
  --include-all-app-icons \
  --minimum-deployment-target 10.15 \
  --output-partial-info-plist /dev/null \
  --standalone-icon-behavior all

actool will generate an Assets.car file which is compatible with all the
new Theme variants of macOS 26 (default, dark, monochrome, tinted, etc).
it also generates an old icns file as a fallback, only default style.

since the new Assets.car file can't be used from cocoa directly, without
using private APIs, we still use the icns file when used from CLI.
this also means that from CLI only the default icon is used and the
macOS theming doesn't have any effect.

the macOS theming mechanism only works with the bundle and a Assets.car
file. all icons are generated on the fly depending on the Theme. this
generation has no public API and the mechanism would need to be
replicated by hand. to replicate this behaviour at least three different
icns would need to be generated, tinting needs to be implemented,
several system events need to be subscribed, and this wouldn't guarantee
the same look as the system mechanism. also none of the tools make it
possible to generate macOS 26 compatible icns file, besides for the
default file, since it at least is missing the necessary padding.
2025-12-21 11:48:52 +01:00
der richter e661165ead github/workflows: add editorconfig linting 2024-10-24 17:40:26 +02:00
sfan5 9737b99845 Revert "editorconfig: punish tab usage"
This reverts commit 3840c98b36.
There are multiple reasons:
- the correct way to prevent tabs being mistakenly added is a CI linting step
- it can affect the editing experience of foreign source files
  under mpv's tree (e.g. subprojects)
- at least one editor (BBEdit) misinterprets the values and also turns
  soft tabs into 7 spaces
- it does not consistently apply to GH code view either
2024-10-20 11:22:09 +02:00
nanahi 3840c98b36 editorconfig: punish tab usage
This makes tab width to 7 on GitHub web UI and supported editors, making it
impossible to use tabs to match the existing 4 space indentation.
2024-06-16 01:22:13 +02:00
NRK 04b220731e editorconfig: add max line
if we're going to have an editorconfig, might as well make it accurately
reflect the coding guide.

also set trim trailing whitespace to true.
2023-11-09 21:30:25 +00:00
Emil Velikov ef301893a5 editorconfig: add initial file/config
editorconfig configuration files hold editor style hints, and
is supported by many popular editors. See https://editorconfig.org/ .

The vast majority of the mpv source/text files are already styled as
4 space indentation, trailing newline at EOF, and UTF-8 encoding.

This commit adds a single .editorconfig root file which applies these
rules to all files using the glob "[*]".

If it turns out to be too inclusive then we can narrow it down later.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2021-10-20 12:26:20 +03:00