-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{select,osc}.lua: add a miscellaneous menu #15499
base: master
Are you sure you want to change the base?
Conversation
@@ -427,3 +427,29 @@ mp.add_key_binding(nil, "show-properties", function () | |||
end, | |||
}) | |||
end) | |||
|
|||
mp.add_key_binding(nil, "menu", function () | |||
local menu = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this list all select? Especially why vid select is hidden?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I saw uosc doesn't have it so I didn't if it's worth adding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I saw uosc doesn't have it so I didn't if it's worth adding.
Of course they has it. In UOSC each button is dynamic and show only when needed. See https://github.com/tomasklaen/uosc/blob/6a1c0e9c6e7e9e43cda1c1ea3e44a911fae45927/src/uosc.conf#L83C1-L83C211 specifically, <has_many_video>video
.
This menu could do this too, to not show items that goes nowhere.
Download the artifacts for this pull request: |
b6e1d02
to
78e807b
Compare
Taken from the last freely licensed version of Symbola. Saving sfdir with fontforge also automatically removed the O flag from 2 existing glyphs. According to https://fontforge.org/docs/techref/sfdformat.html "O" just meant "the character was open when last saved", so it doesn't change anything visible.
Add a generic menu to bar layouts to provide discoverability for the select menus to users who don't realize you can right click OSC buttons. There's no space to add it in box layout.
@@ -0,0 +1,16 @@ | |||
Steps to add new icons: | |||
|
|||
- Install `fontforge` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Install `fontforge` | |
- Install [FontForge](https://fontforge.org/en-US/) |
Steps to add new icons: | ||
|
||
- Install `fontforge` | ||
- Install the last freely licensed version of symbola (`ttf-symbola-free` in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove this step from readme, source font for symbols can be different. You can mention in separate paragraph, that some glyphs in are extracted from symbola font.
- Install `fontforge` | ||
- Install the last freely licensed version of symbola (`ttf-symbola-free` in the | ||
AUR) | ||
- `fontforge /usr/share/fonts/TTF/Symbola.ttf TOOLS/mpv-osd-symbols.sfdir` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Load a font and the project directory, for example: fontforge Symbola.ttf TOOLS/mpv-osd-symbols.sfdir
- Install the last freely licensed version of symbola (`ttf-symbola-free` in the | ||
AUR) | ||
- `fontforge /usr/share/fonts/TTF/Symbola.ttf TOOLS/mpv-osd-symbols.sfdir` | ||
- Check the Unicode hex value of the desired character (`g-a` in vim) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't there symbol table in FontForge? I think I've seen it.
- `fontforge /usr/share/fonts/TTF/Symbola.ttf TOOLS/mpv-osd-symbols.sfdir` | ||
- Check the Unicode hex value of the desired character (`g-a` in vim) | ||
- Scroll until that value in the Symbola window and click it | ||
- Press Ctrl+c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Describe the action, for example. Not only "press".
- Copy selected glyph (Ctrl+C)
- Press Ctrl+c | ||
- Focus the window with TOOLS/mpv-osd-symbols.sfdir | ||
- Click an unused character slot | ||
- Press Ctrl+v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Press Ctrl+v | |
- Paste the glyph (Ctrl+v) |
- Focus the window with TOOLS/mpv-osd-symbols.sfdir | ||
- Click an unused character slot | ||
- Press Ctrl+v | ||
- Press Ctrl+s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Save
- Click an unused character slot | ||
- Press Ctrl+v | ||
- Press Ctrl+s | ||
- Close fontforge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step is probably not really needed to explain
- Press Ctrl+v | ||
- Press Ctrl+s | ||
- Close fontforge | ||
- Figure out the Lua sequence of the new character by copying that of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instruction unclear. Either don't say anything and expect it is clear, or make it explicit.
I think what you are saying here, is to convert Unicode code point to utf-8 chars.
- Press Ctrl+s | ||
- Close fontforge | ||
- Figure out the Lua sequence of the new character by copying that of the | ||
previous character and incrementing the last 3 digits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also mention TOOLS/gen-osd-font.sh
which is used to generate osd_font.otf
. I understand that you did that in GUI?
Oh whoops I did not intend to push the README commit at all I just wanted to update the edition-list check and forgot I did those other commits before. The instructions are broken, even if you follow them the character is completely misaligned and of different size from the others. Rather I am trying to completely replace the font with the one from ModernZ as it both looks better and lets us easily add new characters from it without dealing with fontforge. |
Add a generic menu to bar layouts to provide discoverability for the select menus to users who don't realize you can right click OSC buttons.
There's no space to add it in box layout.
We just gotta figure out how to add a proper icon instead of ☰. Maybe we can extract this from Symbola like in db3754d. Also we could add more entries later like Open file or Edit config file.