Skip to content
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

Script Overlaps with mpv logo #2

Closed
Cananbolt opened this issue Oct 14, 2022 · 4 comments
Closed

Script Overlaps with mpv logo #2

Cananbolt opened this issue Oct 14, 2022 · 4 comments

Comments

@Cananbolt
Copy link

Thank you for the great script. It is very useful, but one thing I would like is to be able to hide the mpv logo when script is active and deactivate it when its inactive.

Reference that may help:
CogentRedTester/mpv-file-browser#55

@stax76
Copy link
Contributor

stax76 commented Nov 27, 2022

I simply hide the OSC altogether before I show the menu, which I hope and believe is sufficient for my use case, it's certainly a very simple solution.

F1 script-message osc-visibility never no_osd; script-binding M-x

@Cananbolt
Copy link
Author

Thank you for the suggestion, this works great, however, the problem is I want the osd or osc to return back once I am finished using the script. Do you have any ideas on how this may be done?

@stax76
Copy link
Contributor

stax76 commented Nov 28, 2022

I think for that, it's necessary to modify the menu script.

In my osm.lua script, I only invoke the input command script-message osc-idlescreen no no_osd, so it only hides the logo, and the logo does not return when the osm menu closes, for me that is sufficient as long as not many users request an improvement.

mpv-file-browser has a solution, not the best possible in my opinion, CogentRedTester prefers it, and it works.

There are two ways:

  1. How it is done by mpv-file-browser:
    CogentRedTester/mpv-file-browser@b90c5a9
    CogentRedTester/mpv-file-browser@cd90c1b
  2. I would try the following, read the state of the OSC, it's saved in shared-script-properties as osc-visibility. Before showing the menu, I would hide the OSC: script-message osc-visibility never no_osd, after the menu closes, the OSC state can be restored.

I hope Seme4eg will find some time and work on feedback users provide, or people help with pull request. I find the script incredibly useful, and it's designed very well.

@Cananbolt
Copy link
Author

I was actually able to find a temporary fix with my configuration of mpv. This may not work for everyone, but since it somehow worked for me, I wanted to share it and hope that it works for someone else as well.

Here are the Steps

  1. Install cycle-commands.lua from CogentRedTeset
  2. Open input.conf
  3. Type in <keybind> script-message cycle-commands "script-message osc-visibility auto ; script-binding M-x" "script-message osc-visibility never"
  4. Open mpv
  5. Press the keybind (you made on step 3) twice to have osc-visibility on never
  6. Once you finished using M-x press ESC to close M-x (or whatever keybind you assigned to close M-x)
  7. Then the mpv logo should just reappear, along with the osc-visibility

In the future, there may be a better fix than this, but, for now, hopefully, this does work for everyone else.

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

No branches or pull requests

2 participants