How to create a gadget in the E16 desktop

To create a gadget in your E16 is really simple, so the desktop has unique features allowing you to set up an application to behave in particular ways

For example let's say you want to have the Nasdaq stock as a gadget in your desktop, you can use a web browser link for that, like using this example:

~ ❯❯❯ chromium --app="https://s.tradingview.com/widgetembed/?frameElementId=tradingview_04652&symbol=OANDA%3ANAS100USD&interval=1&hidesidetoolbar=0&saveimage=0&toolbarbg=f1f3f6&studies=%5B%5D&hideideas=1&theme=White&style=1&timezone=Etc%2FUTC&studies_overrides=%7B%7D&overrides=%7B%7D&enabled_features=%5B%5D&disabled_features=%5B%5D&locale=en&utm_source=www.livecharts.co.uk&utm_medium=widget&utm_campaign=chart&utm_term=OANDA%3ANAS100USD"

note: even if used as an example, we don't recommend using web browsers for anything, since are a bloated hell of wasted resources

Which will look like:

Now:

  • press Ctrl + S (or select the sticky option), this will keep the window among all your desktops
  • press "Ctrl + Alt" + "Right click" on the window, set the stacking to Below, this will keep your window below the other ones
  • if you have composite enabled, select the Opacity value to 60%, this will make the gadget look nicer with a transparency
  • more options: border style: borderless (make sure you know the hotkeys to manage your windows, you have the hotkeys pdf in your docker bar), better the window without borders
  • miscellaneous: toggle skip window lists, this will ignore the window in your "Alt + TAB" switchings

Now try to use your desktop as normal and you will see it act like a desktop gadget, similar to conky, and even better, you can interact with it, the graph used for the demo is fully functional with your mouse

If you want to keep your gadget in all your desktop sessions, select the "Remember" options, so that it will remember the position, size, sticky... everything. And finally, edit your autostart applications list and add the command to it:

scite ~/.e16/startup-applications.list

:rainbowyay: :rainbowyay: :rainbowyay: :rainbowyay: :rainbowyay: :rainbowyay:

2 Likes

It might be an option to use "webkit” widget in stead of a full browser. :thinking:
Maybe even make a small GUI program (also accessible from the menu) out of it using python-gtk (and webkit) asking the user to merely enter the wanted URL.

Just thinking out loud here. :happybounce:

1 Like

Sounds like a good alternative for a lighter run of browser code :slight_smile:

Maybe also with a few arg options like "--no-borders" and similar stuff :smiley:

exactly ...... shall @stoppy98 and I (or anyone else who wants to join in) try our hand at this or will you want to?

Then we can compare RAM usage....nanana mine is smaller than yours !. :madness:

1 Like

nah, me no time for that :stuck_out_tongue:

yeah we can compare ram usage (you didn't had already made a small code that does that?)

In any case it is possible to make a small package for this tool (requires to have a public git source to fetch for the packaging), and so it can be used as a way to display web things. Which makes me wonder if there's not already a tool published that does exactly that :thinking:

IIRC I already built one to show the Elive site for the alternative welcome screen. :idea:
YUP :happybounce:
It's here:
http://triantares.no-ip.net/Elive/test-webkit.py

Only 30 lines of code. :w00t:

Just need to be able to alter the URL before launch.

I'll put it up on github when done.
Maybe @stoppy has some additions I haven't thought of. :thinking:

1 Like

yes but i don't remember where is this code :thinking: could be good if you have a git repos where to put these things :slight_smile:

about alternative welcome screen, that's another issue, we don't have any, we had in the past, which is the elive-welcome package, which has been removed because we found it useless (and another popup to the users, which is not good), by other side there's also an issue by "running by default a webkit process to everybody" (increases ram usage in 200mb or similar IIRC), which is very bad for low end machines, but again, there's not a real defined -need- of a welcome thing in the boot

Look at the edit I made in that post. The link is there.

I also put a renamed version of the same on github now.

1 Like

In fact it can be an idea to consider to replace the menu launchers (web apps) that we have in our menus, some of them in fact, that won't be compatible with all, because some of them requires cookies and sessions and stuff more common in a complete web browser (with your logged users, etc)

1 Like

I noted it down. Let me get done with my website and then i will take care of this too.
First time trying wordpress! Incredibly the biggest pain is uploading the pictures. It takes forever... more or less 30 seconds for a 2mb picture. Lol
I guess the main problem is due to the fact it randomly upload 2/3 times the same picture with no reason

Don't use wordpress if you don't need to ..... it's a PITA. :shocked:
If you don't have much against using a commandline and like quick results. may I advise:

https://sitejs.org/

You will be surprised how versatile and easy it is to deploy.

It's being developed by Aral Balkan (https://ar.al/ ) and Free in the broadest sense.
He's also someone very much worthwhile to keep an eye on and listen to. :smiley14:

1 Like

OK, created a git repository for only the python webkit2 code (using the same URL). It needs about 200mb RAM to run.
GitHub - triantares/Elive-Nasdaq-web-gadget.

It will run from the command line and will need to be stopped/killed from there as it is an undecorated window with no menu bar. Opacity can be set from the script too if wanted (using cairo module) but will require a compositor.
Note it only runs on python3.

1 Like