Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  OpenPlugin the plugin for opening plugins?
« previous next »
  • Print
Pages: [1] 2

Author Topic: OpenPlugin the plugin for opening plugins?  (Read 8079 times)

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1193
OpenPlugin the plugin for opening plugins?
« on: March 04, 2021, 12:04:57 PM »
OpenPlugin

Open plugin is a recent addition to rockbox
at the lowest level it allows storing and hashed lookup of plugins and parameters

its been integrated with the core to enable opening plugins on startup, hotkeys, shortcuts

There is also a companion plugin in the viewers folder to allow you to run plugins using openwith
and a shortcut to the plugin in the apps folder that uses it to start the viewer in editor mode

in edit mode you can export shortcuts back to the file system and use them from the file browser as if you were in the plugin folder

Another use is doing things like making a shortcut that starts the text viewer and loads a specified file using the parameter field

 
« Last Edit: March 04, 2021, 12:07:49 PM by Bilgus »
Logged

Offline bahus

  • Member
  • *
  • Posts: 208
Re: OpenPlugin the plugin for opening plugins?
« Reply #1 on: March 04, 2021, 11:37:07 PM »
I want to be able to open my lua script right from Shortcuts menu in WPS. So I added lua file to Shortcuts but now it simply opens folder where lua script is placed.

Is it possible to run script right away?

>There is also a companion plugin in the viewers folder to allow you to run plugins using openwith

It looks somehow related to my problem.. Though not sure how to proceed with this information :)
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1193
Re: OpenPlugin the plugin for opening plugins?
« Reply #2 on: March 04, 2021, 11:59:42 PM »
Open plugins only works for plugins..

So you need to call the viewer and pass the script as a parameter

like this

run Plugins/apps/open_plugins

select any available menu item and long press select for the context menu
choose 'Add'
choose viewers/lua (the .rock file not the lua folder)

you should now have a entry named lua.rock
long press select choose 'Edit'
rename it to something else eg 'testscript'

scroll to [Parameter]
choose parameter it'll ask to Browse? choose 'Yes'
select your lua script
select 'Back'
and Save 'yes'

finally select the entry again and choose 'Export' assuming you leave the default it is now a shortcut named testscript.opx in .rockbox/rocks/apps/
exit back to the main menu and return to Plugins>Apps and you should now see testscript and it starts your script






Logged

Offline bahus

  • Member
  • *
  • Posts: 208
Re: OpenPlugin the plugin for opening plugins?
« Reply #3 on: March 05, 2021, 12:23:10 AM »
Got it! Thanks. The fact that I need to go to context menu inside Open plugin to get started was not obvious to me.

But again it's not opened right away from Shortucts menu - it moves me to file in apps folder first :(It seems you can't run apps/scripts right from Shortucts menu.
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1193
Re: OpenPlugin the plugin for opening plugins?
« Reply #4 on: March 05, 2021, 01:02:43 AM »
hmm well you could always set the open plugin in the wps context menu
Settings>General Settings>Set Wps Context Plugin

then in wps long press select and choose openplugin from the context menu
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1193
Re: OpenPlugin the plugin for opening plugins?
« Reply #5 on: March 05, 2021, 01:05:48 AM »
You can also browse to the plugin and choose openwith open_plugins and it will do the same but you can't get to viewers from the main menu so its easier to do it manually
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1193
Re: OpenPlugin the plugin for opening plugins?
« Reply #6 on: March 06, 2021, 12:26:16 PM »
I added an entry 'Add' to the main menu to address your concern it will only add it if there are no other entries though
so delete plugins.dat from .rockbox/rocks/ and re-open open_plugins and you should now have an entry ADD

Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1193
Re: OpenPlugin the plugin for opening plugins?
« Reply #7 on: May 06, 2024, 05:36:18 PM »
OpenPlugin should now allow you to choose supported filetypes and automatically use the default plugin registered for the file type
you can still edit what plugin you want to open the file (in case you don't like the default)
but you will still have to run the OpenPlugin ahem plugin ( found in apps ) if you want to edit it

you can even choose a bitmap to be displayed at startup in the imageviewer :)
Logged

Offline Frankenpod

  • Member
  • *
  • Posts: 792
Re: OpenPlugin the plugin for opening plugins?
« Reply #8 on: July 07, 2024, 05:03:38 PM »
Has something changed with this?

I used to be able to start pictureflow from the WPS, by using the context menu, then selecting to 'open plug-in' having previously (somehow, can't remember how it was done) set that plug-in to be the pictureflow plug-in.

Now I find (on the latest dev version) I can't work out how to set the WPS context-menu plug-in.  If I invoke the context menu I see "open plug-in" as a menu entry, but if I select it it just says "can't open set WPS context plug-in".

What's the procedure now to set that WPS context menu plug-in?
Logged

Offline Frankenpod

  • Member
  • *
  • Posts: 792
Re: OpenPlugin the plugin for opening plugins?
« Reply #9 on: July 07, 2024, 05:05:35 PM »
Quote from: Bilgus on March 05, 2021, 01:02:43 AM
hmm well you could always set the open plugin in the wps context menu
Settings>General Settings>Set Wps Context Plugin

This option doesn't seem to be in the "Settings>General Settings" menu any more.

[Edit]  Aha, it's now in a "while playing screen" "What's Playing Screen" sub-menu!
« Last Edit: July 07, 2024, 05:30:26 PM by Frankenpod »
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1193
Re: OpenPlugin the plugin for opening plugins?
« Reply #10 on: July 09, 2024, 01:43:47 AM »
I actually just used this the other day and didn't even realize it was different!
Logged

Offline Frankenpod

  • Member
  • *
  • Posts: 792
Re: OpenPlugin the plugin for opening plugins?
« Reply #11 on: July 09, 2024, 06:56:57 AM »
Honestly can't remember where the option used to be.  I may have had trouble finding it the first time round as well!
(I guess it's hard to keep the manual up-to-date with the always-ongoing code changes)

Though I suspect a "What's playing screen" sub-menu must be new, or I'd have noticed the inconsistent terminology before.

Still think it would be nice if the "open plug-in" option on the context menu were to include the name of the plug-in that it has been set to open.   Also, if you select that option before setting a plug-in via the settings menu, could it not at that point ask you to pick a plug-in, rather than just giving an error message?  Maybe that's tricky to accomplish, just a thought from a user-perspective.
« Last Edit: July 09, 2024, 06:59:52 AM by Frankenpod »
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 467
Re: OpenPlugin the plugin for opening plugins?
« Reply #12 on: July 09, 2024, 07:32:31 AM »
Quote from: Frankenpod on July 09, 2024, 06:56:57 AM
Honestly can't remember where the option used to be.  I may have had trouble finding it the first time round as well!
(I guess it's hard to keep the manual up-to-date with the always-ongoing code changes)

Though I suspect a "What's playing screen" sub-menu must be new, or I'd have noticed the inconsistent terminology before.

I posted a comment back in May re this, in a discussion about playing tracks from a playlist screen:

Quote from: iPodVT on May 23, 2024, 11:03:58 AM
This reminds me that I recently noticed that in Settings->General Settings, the WPS is spelled out as "What's Playing Screen".  I don't recall ever seeing it as anything but "While Playing Screen" (e.g. Settings->Theme Settings->While Playing Screen).  I think I kind of like "What's" better than "While" for that screen.
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1193
Re: OpenPlugin the plugin for opening plugins?
« Reply #13 on: July 09, 2024, 08:30:15 AM »
in regards to showing the name.
The way open plugins works is by assigning a hash to the filename that gets stored it literally doesn't know what the path its going to get is at that point in the chain

you could get around it by storing the title you set but thats an awful lot of trouble (and code)
allowing you to pick a plugin if its empty should be do-able
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1193
Re: OpenPlugin the plugin for opening plugins?
« Reply #14 on: July 09, 2024, 09:49:21 AM »
I actually have a mechanism inplace to allow a fixed set of plugin to be used if its not already set

I think what I'm going to do is make a plugin that you can run the first time that explains where the setting is and
allows you to pick a plugin if one isn't set
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  OpenPlugin the plugin for opening plugins?
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.14 seconds with 17 queries.