or Alexis Menard in the real world.

The new device notifier in KDE4


After many versions, many layout problems let me introduce you the new device notifier :

Notifier 1

Another screenshot :

Notifier 2

As we can see on screenshot it display recent plugged devices in a list with the number of actions associated to the device. It you have one action for a device and you click on it, it open directly the action. If you have many actions associated to the device it open solidUiServer with the action list.

When you plug a device the notifier pop up on top to inform you when a new device is plugged.

Actually i do a sample file wich recognize only usb key but for applications it will be easy to associate an action to a device. You can see the following example :

[Desktop Entry]
X-KDE-Solid-Predicate=[[ StorageVolume.ignored == false AND StorageVolume.usage == 'FileSystem' ] OR [ IS StorageAccess AND StorageDrive.driveType == 'Floppy' ]]
[Desktop Action open]
Exec=dbus-launch dolphin

You have just to create a solid predicate which match with the device you want to associate and after you install this .desktop file in installdir/solid/actions and hotplug engine will do everything for you…

You can give me feedback it’s the goal of my post…



Author: darktears

Software Engineer at Intel Corporation.

27 thoughts on “The new device notifier in KDE4

  1. Great work, it looks really nice. However, wouldn’t it be better if the actions would appear in the plasma notifier thing instead of a separate window? (it’s plasma right?)

  2. Hey, the “3 actions available” stuff, while useful for debugging, is actually kind of ugly from a user perpective. That space might be better filled with an available space on the device bar or similar. If a user clicks on it to find that there’s three actions, well then they know that there’s three actions – they don’t really need the computer to count the actions for them πŸ™‚

    Just a thought, but it looks good πŸ™‚ Nice to see the systray working in that screenie too πŸ™‚


  3. Great to see the device notifier coming along so great. I look forward to the more polished form, where the action is written expressly. Such as:
    What do you want to do:
    *Open with* Amarok
    *Browse in* Dolphin

    By the way, looking at your screenshot I cannot help but notice once again that KDE 4 is beautiful beyond belief πŸ™‚

    Keep it up!

  4. It looks good but I have a suggestion. I don’t know what plasma is capable of but see my little modification of the above screenshots.

  5. nice work!

    i want your wallpaper!!!

  6. My concern is the “actions available” string. After it is translated to the languages with complicated characters, for example, some asian languages, users will see it jammed in little space. IMHO, ether put the string in other space or don’t show it. But it’s just my opinion, maybe others think it’s ok.

  7. That looks nice and minimal, just the way I like notification windows

  8. Looks nice! Instead of popping up the dialog box, could you include a drop-down menu to the right of each device? Specifically, to the right of the text, add a button with a down arrow, that when you click would drop down a list of the available actions (along with their icons) and then clicking on an action would execute it. Also, I don’t know if there is a configure device actions KControl yet for KDE4, but you could add a config button to the right (that appears only on hover over) to configure actions for each device.

    In the pop-up, obviously, the icons for Amarok and Dolphin need to be properly displayed, but could they also be big, like in KDE3? (Smaller list items are harder to click.)

    Is this applet meant to replace the “Storage Media” applet in KDE3 by any chance?

  9. Nice concept! looks good.

    A few thoughts:
    – shouldn’t it be “new plugged in device?”. Now you have devices that might be unplugged as well. And if the previous device was plugged in an hour ago, will you still show it?
    – I’d remove the “3 actions available”. [1] I’d rather show some descriptive information about the device. e.g. the name so you recognize it’s indeed the device you plugged in.

    1: this form also doesn’t show “3 input fields available”. πŸ˜› nice for debugging, but not informative at all.

  10. I agree with the other comments. IMHO the number of actions isn’t an useful information. Better would be the disk usage or the mount point.

    I also agree with kwilliam’s suggestion to integrate the dialog in a menu for the item.

    This is really good work. Thank you!

  11. Look this picture. Is it possible the notifier to look like this on the picture?

  12. I will answer at all…

    First for translation problems mmm i haven’t think about it so i don’t know actually what solution we can find…

    So the name displayed is the name gived by HAL (so Vendor+name) when the value are set…Actually my device have no name so it explain “volume (vfat)”

    Actually it display all items plugged when you have launch it…By clciking right on it you can configure it and set the showing time (soon implemented)…

    This this applet will replace the Storage Media applet in KDE3…

    I think displaying all actions in the small popup will be a bed idea because some device have many actions and it will be not easy to read it in this small popup…

    i will see to create a configuration dialog to manage associations for a device…

  13. @Plamen Terziev : integrate in the taskbar?

  14. I really like the notifier, but like the other, I think the “X action available” is not really nice.
    What if you put a link on the default action instead ? (and of course clicking on it will activate the default action)

  15. Yes. I think when it is integrated it looks much better.
    But it is only suggestion. I don’t know if plasma is capable of this.

  16. Actually not…4.1 perhaps…But i keep in mind this suggestion

  17. Ok. Otherwise the notifier looks really great πŸ™‚

  18. Nice job ! It really looks great.
    I agree with the previous posts about the number of actions.
    I think there’s still something missing… where do I click to close this popup ? πŸ˜‰
    And I hope this window doesn’t take focus as well.

    Last thing… is it really meaningful to have a list of devices ? Usually, you’ll just want to see the last device that has been plugged, do something with it and get rid of the notification. And if you plug 2 devices, well, just show 2 notifications πŸ™‚ (stacked, or whatever…)
    This could allow to have smaller, and less obtrusive notifications. And I feel that it would be more like the expected behaviour of a notification, too…

  19. Lots of people already pointed out that telling the number of available actions isn’t very helpfull. Instead, would it be possible to just display the default or the last used action for this device, along with a “more actions…” link that would take you to the complete list of actions?
    Also, it would be usefull IMHO if it were possible to rename a device. I am not sure if it would be possible to uniquely identify a plugged in device (some serial number perhaps?), but it would enable you to replace the “volumne (vfat)” with a more sensible “work USB stick” or something along these lines. Also, should you really be using HAL for this? Isn’t Solid capable of delivering this information? That would be the more obvious choice in a KDE 4 environment IMHO.

    I hope these suggestions will be usefull for your further (good!) work on this.

  20. @Andre : I can add a link with more action and open solidUi server.Many people says that is useless to have the numbre of actions so i will display the default action by adding in a .desktop file this notion.

    The name displayed volume vfat is the name of my device (my usb key and my memory card same), i use solid to have a name…I write by default the name of the device and if it doesn’t exist the vendor…

    Naming a device will implies we will store information associated to the device…I’m not sure it’s very usefull…You give a name correct to your device like darktears’s USB and it will be displayed…

  21. @darktears. Good work but as many said, please get rid of that “N actions available”, it’s horrible πŸ™‚

    Second, do you know if there will be an easy way to rename volumes via solid->hal->correct backend? It would be really useful… and I think it should be even integrated in Dolphin, but this will be 4.1 I guess

  22. Ah. This reminds me of a mockup I did a while ago. I thought that in KDE4, we really had to get rid of the action list window which pop up when you plug in a new device. It seems my wish will become reality.

    I posted the mockup on kde-look, and it received pretty good responses. If you want to have a look, it’s here.

    If you have time, couldn’t you please tell me what you think of it? Fo example, I don’t like to have the actions in a separate window, but if you think it’s better than my solution (see mockup), I would like to hear why. =)

    Keep up with the great work! Oh by the way, I think the “n actions available” should be removed… πŸ˜‰
    (Maybe you should update the post to reflect this change. So you don’t have to answer this question again.)

  23. @darktears:
    I think it would be usefull to be able to name devices, but I’m not sure it should be solved in a device notifier. It probably needs to be at the Solid level. I think it does make sense to store information on devices this way, as people tend to connect the same devices regulary anyway. I think it would be very usefull to see the name “AndrΓ©’s private USB stick” pop up instead of “volumne (vfat)”. It’s so much more informative. But again: this is probably a Solid issue rather than a device notifier issue.

    Thanks for taking up the suggestion to remove the action count with something more usefull πŸ™‚

    Your link did not get through. Which mockup would that be?

  24. Wow, I totally forgot about that mockup, it’s indeed amazing.

    I would love to see you implementing it, maybe for KDE 4.1? πŸ™‚

  25. @Hans: GREAT mockup!!
    @darktears: if you could take some inspiration from this mockup, it would be great πŸ™‚ the osx-style eject button is definitely “the right thing”(TM) (contextual menus suck)

  26. Hello again πŸ˜›
    I’ve just noticed that your plasmoid went default in recent KDEsvn… great! But I’ve also noticed that the “recent plugged devices” means that after a certain amount of time a device disappears from this list. What about making it a “plugged devices” plasmoid?
    Thanks for your work!

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s