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

[Feature Request] Custom commands on selectfile event #119

Open
tupo2 opened this issue Jan 25, 2023 · 5 comments
Open

[Feature Request] Custom commands on selectfile event #119

tupo2 opened this issue Jan 25, 2023 · 5 comments

Comments

@tupo2
Copy link

tupo2 commented Jan 25, 2023

Hi JoJo,

Instead of just move the selected file in the playlist, would it be possible to add an event, for example when the selected file is reached in the playlist?
Example, pause playing on selected file:

KEY script-message playlistmanager onselectfile <command>
KEY script-message playlistmanager onselectfile set pause yes
@jonniek
Copy link
Owner

jonniek commented Jan 29, 2023

This seems very niche. It's not impossible, but also it seems kind of awkward to use the selection for this. There might be some possibility to make it a bit more general. Something like:

KEY script-message playlistmanager event cursor onload <command>
KEY script-message playlistmanager event cursor onclose <command>

Something like this maybe 🤔 So if you run the event cursor onload pause yes script message it will register the command to be run when the hovered file is loaded. This would allow setting up multiple of such events rather than locking the selection for it.

Still need to think a bit if this belongs in this script or if it's possible to make a separate one.

@tupo2
Copy link
Author

tupo2 commented Jan 29, 2023

Yes, using the cursor seem a better solution than the selection. A command to lock the cursor position would be handy too, to avoid accidentally moving it.

@CogentRedTester
Copy link
Contributor

@jonniek my custom keybind from file-browser might be interesting to you if you're thinking of going down this route. You'd probably want a much simpler system though.

@jonniek
Copy link
Owner

jonniek commented Jan 29, 2023

A command to lock the cursor position would be handy too, to avoid accidentally moving it.

You can change

sync_cursor_on_load
reset_cursor_on_close
reset_cursor_on_open

in settings to "no" for permanent change or at runtime with KEY change-list script-opts append playlistmanager-sync_cursor_on_load=no

@tupo2
Copy link
Author

tupo2 commented Jan 29, 2023

When I say lock the cursor, I mean to not allow the cursor to move up and down.

@tupo2 tupo2 changed the title [Question] Custom commands on selectfile event [Feature Request] Custom commands on selectfile event Nov 19, 2023
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

3 participants