Plasma – A nice weather “plasmoid” in 4 easy steps

Some time ago, a person on asked in the KDE group which weather plasmoid people preferred. He seemed to like my suggestion, so I figured, why not share it here too?

The end result will look like this:

Weather Plasmoid(but hopefully with less rain…)

As you can see, it’s an hourly forecast. It reports the weather, temperature, wind speed and direction and – most important for me – precipitation.

Enough talk already; here are the steps:

  1. Install the Scripted Image plasmoid. It has some quirks (for example, auto reload doesn’t work on one of my computers), but I haven’t found a better alternative.
    The plasmoid is easily installed from the Add Widgets dialog (cashew -> Add Widgets…). Click on “Install New Widgets” and choose “Download New Plasma Widgets”. Search for “image” and press on “Install” in the “Scripted Image” box.

    Install Widget
    Note: When I close the dialog I get a message stating that the installation failed. However, seeing how the widget appears fine, it seems like it’s just false alarm.

  2. Go to and search for your city. Click on “Hour by hour” and get the URL for the image (in Konqueror: right click -> Actions -> Copy Path -> copy whole path) hour by hour
    Of course you’re free to use another weather forecast service if you want, as long as it shows the forecast in an image.
  3. Add “Scripted Image” to your desktop (cashew -> Add Widgets… -> drag “Scripted Image” to your desktop) and click on “Configure…” in the widget.
  4. In the dialog, paste the URL from step 2 under “Image URL”. Choose an appropriate number of minutes (for example 30) for reload “Interval” and set “Scaling” to “Scale applet to content”. Click on “OK”.Configure Widget

We’re done! Hope you find it useful, and as always, comments are much appreciated.

About these ads

43 Responses to “Plasma – A nice weather “plasmoid” in 4 easy steps”

  1. Karl Günter Wünsch Says:

    And how do you get this as a proper window, not such a useless toy as a plasmoid?
    I have the desktop permanently and completely obscured all the time, I raise the single window I want to interact with (or whose information I want to see) whenever I need it. I can’t do that to plasmoids because they don’t adhere to the window management of the WM!

  2. mutlu Says:

    @Karl: Put the plasmoid on the desktop, the call the dashboard with Ctrl-F12. Exit dashboard with Esc… and, by the way, you could be a little nicer to the people who produce your desktop. Otherwise f***ing learn programming yourself.

    @Hans: Nice tutorial. I had read about the scripted image plasmoid somewhere, but I never tried it out. I guess it is time to do so… lots of potential there. :)



  3. hias Says:

    @Karl: alternative to Ctrl+F12 and f***ing learning programming is:
    - go to systemsettings->Desktop->Screen Edges
    - click on an abitrary edge and select Show Dashboard
    - click on Apply
    - move your mouse to the edge you selected for Show Dashboard -> Dashboard appears
    - move your mouse again to the same edge -> Dashboard disappears

    @Hans: very nice

  4. anon Says:


    Use plasmoidviewer, or try docking it in the panel (assuming this is a “popup” type Plasmoid).

  5. Bojan Says:

    Great tip, never hear before about scripted image. This will be useful. Also nice blog. Keep up the good work.

  6. Karl Günter Wünsch Says:

    @mutlu: obscuring all other windows doesn’t make things any better, it’s even more frustrating. I am a professional software developer and UI designer.
    @hias: Making the screen edges “activate” the beast is no option, for once how would you get there using the keyboard and second, I use my computer for different things than play with plasmoids, so if I touch the edge of the screen while using the mouse editing an image or while doing any other activity it would annoy the heck out of me because I just have been distracted from whatever I wanted to do.
    @anon, why doesn’t anyone document this possibility properly. I tried and it looks promising to me to get a bit of value out of the whole development. I now hope that the plasmoidviewer can adhere to the session management and reopen the plasmoids as needed…
    For me a plasmoid on the desktop holds no value whatsoever, that space is always obscured by windows that can be raised and lowered as needed, widgets that are exempt from management are a nuisance. So if plasmoidviewer is the solution to this mess for people like me, who like to be able to navigate with the keyboard and normal window management then by all means the situation is much less frustrating…
    Btw. if I were a troll or out to offend people, I wouldn’t use my real name!

  7. Pavel Says:

    @Karl Günter Wünsch: you can use for example 4th desktop only for plasmoids, CTRL+F4 if you using keyboard ;)

  8. Karl Günter Wünsch Says:

    @Pavel, again with that solution I’d loose view of the other things I want to see in conjunction. Having two non interacting (mixing) levels of windows the plasma desktop is a world all by itself that doesn’t properly interact with the windows it is supposed to support. And the more functionality is buried in plasmoids the interaction gets worse. For example: How do you switch with the keyboard from one plasmoid to another if you have them both displayed? How do you copy and paste contents from one plasmoid in another without using the mouse? If there should be a way that is at least so obscure as to be non existent…

  9. Pavel Says:

    @Karl Günter Wünsch: I see, but if you want this picture in proper window, open it in Konqueror ( right click -> show image (or similar, I don’t have english version)).

  10. bauerbob Says:

    @Karl: Why do you bother? Seems like you don’t use your desktop at all – you just need a window manager.

  11. tanghus Says:

    @Karl Günter Wünsch:
    Quote: “I use my computer for different things than play with plasmoids”. Then please don’t use Plasmoids. Go to the website to see the weather. Or do as Pavel suggests and have another desktop for viewing Plasmoids. I use it like that. One desktop with different activities.

    @Hans: Excellent HOWTO. Unfortunately the Scripted Image Plasmoids I have added to my desktop don’t refresh. I’m using KDE4 RC3 on Kubuntu Jaunty.

  12. Hans Says:

    Thanks for all the positive comments!

    I tried to dock the plasmoid in a panel and, well, it wasn’t the smartest idea. ;)
    It shows a part of the image instead of displaying an icon. If you want to remove it, you have to click on the panel cashew first.

    Yes that’s one of the problems I have too. There’s a suggested fix on kde-look, see the link in the article.

    @Karl Günter Wünsch:
    If you don’t like the whole idea of plasmoids on the desktop, this tip isn’t for you. Of course you could use a “normal” application to display the forecast image (such as Konqueror or an image viewer), but I don’t know the best way to do it.

    I personally prefer “clean” desktops, so I understand if you don’t want to put plasmoids on your desktop. To handle my widgets, I use several “Activities”. The default activity is completely empty except for the wallpaper. On the bottom left, I have a panel containing the “Activity Bar” plasmoid and set to auto hide.

    Most of the time, the desktop plasmoids stay out of my way. If I want to check the weather, I switch to my “Weather” activity that contains several weather plasmoids (including this one). If windows are in the way, I switch to an empty virtual desktop or toggle the dashboard.

    In KDE 4.3, you can use a separate activity as your dashboard. In other words, you don’t have to put widgets on your desktop if you want to see them when you hit Ctrl-F12 – the way Mac OS X works.
    You want to check the weather forecast? Hit Ctrl-F12 (or whatever shortcut you’ve set up), hit it again when you want to continue your work. It’s pretty similar to how I use Yakuake, one of my favorite applications. I think it’s very convenient, but if you don’t like it, you’re free to do it your own way. But that’s out of scope for this article.

  13. tanghus Says:

    @Hans: Thanks for the tip. I used the suggested fix and it works just fine :-)

  14. Socceroos Says:


    It sounds to me like you shouldn’t be using a desktop environment at all. Just use the command line, that way, you can use your keyboard for everything.

  15. pns Says:

    There is another way. As Hans above mentioned create a new panel. Add the plasmoid and resize panel to fit the plasmoid. set the panel to always on top. You will have your plasmoid always on top, maintained through multiple sessions. I dont know if it can be transparent or not. QT 4.5 webkit supports transparency but I am not sure about the current version.

  16. Aaron Seigo Says:

    “Note: When I close the dialog I get a message stating that the installation failed. However, seeing how the widget appears fine, it seems like it’s just false alarm. ”

    yes, it is a false alarm. it was also fixed for 4.3, so i really hope you’re doing this on 4.2, otherwise i have to go back and dig some more (and figure out how you’re triggering it ;)

    anyways, neat hack :)

  17. Hans Says:

    @Aaron Seigo:
    There’s no reason to lose any sleep, this was on KDE 4.2.4. :D
    (Grrr.. I would be running 4.3 if it wasn’t for the delay… ;))

  18. Aaron Seigo Says:

    @Karl Günter Wünsch: you’re in a bit of an odd situation .. you want to use it, but you don’t want to use it. or, more accurately, you want to use it in a way that it wasn’t intended.

    fortunately for you there is plasmoidviewer. unfortunately, i don’t think it does session management and it certainly won’t work nicely if you load up several different widgets. that’s because it’s designed as a testing tool, not a full-fledged app for running widgets-in-a-window.

    fortunately, plasmoidviewer is very small, code wise, and it would be easy to add these things to it. you say you are a professional developer, so with a bit of effort it should be easy to make it do exactly what you want. then we can merge your patch(es) into svn and others can enjoy using plasma widgets that way, too.

    you said:

    “Btw. if I were a troll or out to offend people, I wouldn’t use my real name!”

    i do find your approach to discussing the matter abrasive, but i’m just chalking that up to your cultural background. i think you could knock it down a notch, all the same.

    “Having two non interacting (mixing) levels of windows the plasma desktop is a world all by itself that doesn’t properly interact with the windows it is supposed to support.”

    you’re making a classic mistake here: plasma widgets are NOT windows. using your definition, then we should complain about emails and folder lists in kmail being windows as well, or the objects in a Karbon or Inkscape picture as being windows. you are applying the wrong object-concept to plasma.

    i understand how that can happen: they look like discreet, functional items that you can move around. the experienced mind may quickly map that to the closest known concept: “windows”. but that’s not an accurate assessment.

    the illusion is caused by you being too familiar with applications that create the UI for you and then bake it solid so you can’t change it all that much. along comes plasma which doesn’t do that at all and you can’t identify the UI as “application” because it’s “too plastic”. but it is just an application with a UI, one that happens to be very plastic.

    this is a modern trend, and i think those who think in terms of “windows move and applications are static” will have increasingly difficult times with things until they break through those concepts a bit.

    you also said:

    “And the more functionality is buried in plasmoids the interaction gets worse. For example: How do you switch with the keyboard from one plasmoid to another if you have them both displayed? How do you copy and paste contents from one plasmoid in another without using the mouse? If there should be a way that is at least so obscure as to be non existent…”

    the same way you do in any application: tab.

    unfortunately, QGraphicsView has been going through a fairly constant pace of change in behaviour over the last 2 years that we’ve been using it and this has caused a number of regressions (which we then later end up fixing). for instance, right now changing the parent item of a widget on the canvas removes keyboard focus if it had it, which makes it a little annoying :/

    eventually this will all calm down and we can move on to implementing visual feedback for tab-movement on items that don’t have a text edit area (which makes tabbing into them fairly easy)

    all the same, many people are already getting quite a lot out of plasma. on the other side of the coin, plasma will probably never be what some people want. such is life.

  19. tanghus Says:

    @asiego: I installed on KDE4 RC3 with no warnings so no worries :-)
    Regarding your latest post it is a great explanation of the new desktop(?) concept. I’ve had big difficulties grasping it, mainly because I use to work the same way as Karl with maximized windows which I switch between.
    Now that I’ve found out a way of having the best of both worlds the Plasma thing has really grown on me :-) Especially since I found out how to use Activities.
    We could actually use a mailing list dedicated to Plasma – for users also, meaning no svn/git commits and not too technical. And I still haven’t figured out where to report bugs/wishes for Plasma specific things…

  20. Edward Says:

    Great tip! I never took the time to investigate the function of the Scripted Image plasmoid. Now I know :)

  21. KenP Says:

    I don’t see the image on the plasmoid after following the steps you have listed. I tried right-click on the plasmoid and ‘Reload’ but nothing yet.

    Do I have to wait for the time interval before the image appears for the first time?

    Using KDE4 4.2.98 on Kubuntu Karmic.

  22. Fri13 Says:

    Very nice tip!

    I just have somekind bug/error currently on scripted image plasmoid. It does not show the URL: path at all. So I can not paste the image path there. Currently using 4.3 RC3.

    Well. hopefully fixed someday.

    btw, this can be used more easier for even comics than the comics plasmoid itself!

  23. Karl Günter Wünsch Says:

    My beef is with the inconsistencies in behavior. Even today the two levels of window management (which is exactly what we have here) are kept partially distinct. I think to make a usable desktop you’d need to loose this distinction and think how people other than yourself may want to use the offered possibilities.
    Btw this is the first time I got a response from you other than “You are stupid because you don’t want to play with the desktop all day long”.
    Why am I talking distinction here: For example: You can’t bring a single plasmoid to the top on demand – this means you have to take a break in your normal work and switch desktop or view completely to get to the little tidbit of information you might need just to continue in your normal workflow. If you could selectively and easily raise a single plasmoid back and forth and even give it the keyboard focus then this diversion from your main work would be minimized – as it should be.
    Another example are the menus displayed by the cashew, they still disappear uselessly behind the “normal” windowed applications – so I chose to interact with the desktop on this level (I clicked on the cashew, so I need to operate the menu) – but to do so I have to close or minimize the windows in the region in which the menu will appear. Another senseless break in interaction. As nice as a plasmoid may be, these breaks in usability in conjunction with anything else that is not a plasmoid make the experience very very frustrating, because they get into the way of using the desktop and slow down your workflow.
    A very good idea with one big drawback, I can’t have a plasmoid always on top because it would get into the way of interacting with the applications that I need to use. I might need the information every 15 minutes or only once a day or only once a week. That’s my whole point. Plasmoids and windows don’t mix but they should (to say the least). Why not have a proper and documented way of managing the two layers that they mix rather than clash when used in conjunction?

  24. tanghus Says:

    @KenP: I had to do a “killall plasma-desktop && plasma-desktop” in KRunner while I was playing with it. Depending on your KDE version it might be just “plasma” instead of “plasma-desktop”.

    @Fri13: What do you mean by “It does not show the URL”? Do you mean that you cannot input the URL in the settings dialog?

    @Kurt: I agree that the new workspace/desktop (dunno what to call it) still needs a lot of tweeks to be usable. Wish I could find a better forum for discussing that, instead of here at Hans’ excellent HOWTO.

  25. Luca Beltrame Says:

    @tanghus If you have concrete proposals, the KDE Brainstorm ( would be a good place. Or the KDE Community Forums may be a place to discuss things (some developers even pop up there).

  26. Hans Says:

    “We could actually use a mailing list dedicated to Plasma – for users also, meaning no svn/git commits and not too technical. And I still haven’t figured out where to report bugs/wishes for Plasma specific things…”

    As Luca Beltrame suggested, check out the KDE Community Forums. There is a subforum dedicated to Plasma, and you can also find some Plasma tutorials in Tutorials & Tips.

    Bugs should be reported to (except for third-party plasmoids, in which case the report should be sent the maintainer).

    For me it loads in a couple of seconds (KDE 4.2.4).

  27. tanghus Says:

    @Luca & @Hans: Thanks. I’ll check the forums again. I’ve looked at them before, but they seem a bit disorganized to me. On the other hand, so are the mailing lists ;-)

  28. Thomas Says:

    Thanks for the tip and your answer on It works very well for me.
    But I still wonder why the Norwegians have such fantastic weatherinformation.

    The person who asked on

  29. tanghus Says:

    @Thomas: Yes, that site is really great. Being Danish, I usually use but it’s not nearly as good as the Norwegian site.
    Made a weather Activity:

  30. Hans Says:

    “But I still wonder why the Norwegians have such fantastic weatherinformation.”

    Yes it’s pretty strange, since the weather in Norway is easy to predict: rain. (Sorry; being a Swede, I couldn’t resist. :D)

    I read in a news article about that they decided to release everything for free (as in gratis) – way to go! Other sites that use as provider doesn’t have to pay anything.
    The Swedish counterpart (SMHI) uses Flash to present the forecast (blergh). Fortunately there’s a SMHI plasmoid.

    @ tanghus:
    Nice screenshot!

  31. Anders Says:

    Cool concept!

    Here, the scripted image plasmoid does not work, trying the update function in its context menu gives this in the error output:
    JS CONSOLE MESSAGE: line 1 : “ReferenceError: Can’t find variable: init”
    plasma(31265)/libplasma Plasma::WebView::keyPressEvent: QKeyEvent(KeyPress, 1000021, 4000000, “”””, false, 1)

  32. Greg Says:

    Great tutorial! I am very interested in weather forecast and this kind of plasmoid iss very useful to me. However, this image looks “blue”… I use Blend as plasma theme. A switch to ait plasma theme didn’t solve this problem. What can I do then? I’d like to have it with white background.

  33. Greg Says:

    sorry, here’s the screenshot:

  34. Hans Says:

    Thanks. It looks like your image somehow got selected (also has happened to me once). Is it still blue after a plasma restart? (kquitapp plasma; plasma). You could also try to remove the widget and add it again.

  35. How do you use activites? « Who Says Penguins Can't Fly? Says:

    [...] Scripted Image + – Hourly forecast from [...]

  36. Kalnz Says:

    Shows nothing!
    If I inspect this widget, I see this error:
    “Failed to load resource: Frame load interrupted by policy change.”

  37. Hans Says:

    Hey, sorry for the late response. It seems to work fine here (Plasma Desktop 4.10.1) if I add the widget, and then restart plasma-desktop (kquitapp plasma-desktop; sleep 5; plasma-desktop).

  38. Vladimir Dvorak (@LadaDvorak) Says:

    I have problem to add multiple scripted images on the desktop. Only first one is rendered.

  39. Hans Says:

    @Vladimir Dvorak:

    I haven’t used this plasmoid in a while so unfortunately I can’t help you. You could try to write a comment on the page.

  40. Ade Malsasa Akbar Says:

    Hello Mr. Hans, how to make a Plasmoid (KDE Plasma Widget) be Always On Top? I can’t find any configuration in every Plasmoid I have. If it possible, I will make my new installed STDOUT Plasmoid (from always on top for ping command everytime. I need such realtime output to see whether I connected to internet well or not well. Thank you.

  41. Hans Says:

    @Ade Malsasa Akbar:

    As far as I know you have the following options:
    1. Place the plasmoid in a panel.
    2. You can use something like the command “plasma-windowed”.

  42. Ade Malsasa Akbar Says:

    Hello Mr.Hans, I forgot to say thank you for your KSuperkey. Since I knew it from KDE Forum, and found it in this blog, I used it and it always be on my KDE Plasma. If I reinstall my Ubuntu, I will also reinstall your KSuperkey. It is a long waited feature in KDE for me. It is very helpful. Thank you.

  43. Hans Says:

    @Ade Malsasa Akbar:

    Glad to hear that you find it useful!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 32 other followers

%d bloggers like this: