Adjustable Clock
Source (link to git-repo or to original if based on someone elses unmodified work):
Developed and tested on KDE 4.11 with Qt 4.8 (Kubuntu 13.10).
Source (main repository, with more frequent updates) is located at:
https://github.com/Emdek/plasmoid-adjustable-clock
Warning!
Version 4.0 (and newer) is not backwards compatible with 3.x, all custom formats need to be exported and manually converted.
QML themes support is currently considered as experimental, behavior and available API are not yet stable and most probably will be changed with next release.
Tips:
- to change tool tip text you need to set options toolTipExpressionMain and toolTipExpressionSub in applets configuration file (usually located at ~/.kde4/share/config/plasma-desktop-appletsrc), in group containing line plugin=adjustableclock;
- you can use advanced WebKit features (all of these that work with for example rekonq should work here too), for example use CSS to create reflections:
-webkit-box-reflect:below 5px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(0.5, transparent), to(white));
And much more. ;-)
If you created interesting theme and want to share it then post in comments!
Features:
- fully custom date and time using JavaScript API to obtain date and time components;
- multiple clock themes utilizing various designs;
- possibility to use rich text editor or edit source directly (HTML and CSS or QML) to adjust theme;
- context menu with actions to copy formatted (adjustable expressions) date and time to clipboard;
- fast copy to clipboard of adjustable date and time expression after middle mouse click on the clock or activation of keyboard shortcut;
- adjustable tool tip (hidden option, toolTipExpressionMain and toolTipExpressionSub keys);
- standard clock calendar.
If you have found bugs or have suggestions you can contact me via email, message or using comments, before you will vote bad. And remember that not everybody has enough time for fast replying. ;-)
4.1.4 (01.11.2013):
- fixed week number not being updated;
- added missing title of "Insert Component" dialog.
4.1.3 (27.09.2013):
- ensure that component values are always up to date;
- adjust timestamp for time zone offset;
- do not allow for accidental nesting of components in editor;
- added option to hide date in Train Clock theme;
- added workaround to ensure that hands of SVG Clock have correct initial positions as soon as possible.
4.1.2 (01.06.2013):
- ensure that center of SVG Clock theme is always valid;
- improve resizing in vertical panels.
4.1.1 (25.05.2013):
- fixed WYSIWYG editor for HTML themes;
- fixed missing dialog for "Insert Component" actions.
4.1 (15.05.2013):
- added SVG Clock theme (analog clock that uses Plasma theme);
- added experimental support for QML themes (alpha state);
- added simple file templates for new themes;
- move theme editor to own dialog;
- move theme specific actions to context menu;
- added ability to install and export themes (Plasma Package ZIP);
- some other improvements and fixes.
Ratings & Comments
354 Comments
Can you please port it to Plasma/KF 5?
I am preparing to do so, you can follow this ticket: https://github.com/Emdek/plasmoid-adjustable-clock/issues/16 I am hoping to have some usable results before then end of September, assuming that being forced to use QML will not have too big negative impact on features.
Nice widget, I've been looking for this for years, thank you! Works fine in Kubuntu 14.04 with KDE 4.13. I've created my own theme, screenshots (and explanations for Italian speakers) here: http://tallinux.altervista.org/blog/personalizzare-data-in-kde-mio-tema-adjustable-clock/ Download here: http://tallinux.altervista.org/blog/wp-content/uploads/2014/09/adjustableclock-talltheme-digitalinline.zip (or from the above page linked by "Scaricate da questo indirizzo). Maybe it's helpful for other people :)
The formating of the clock just doesn't work in a usable way, when you how you may want the clock to chow the hour, it doesn't upgrade or it doesn't do correctly... so BAD widget. I don't know if this errors with this dissapointing widget happens because I'm using KDE 4.13, but I know that plasma remains the same as in KDE 4.11... so bad widget, unstable.
The formating of the clock just doesn't work in a usable way, when you how you may want the clock to chow the hour, it doesn't upgrade or it doesn't do correctly... so BAD winget.
It works correctly, when used correctly. If you have issues with WYSIWYG then you should use source editor or ask someone to help you.
(for errors please complain to google translate) Dedicated to fussy people like me: so the hour hand of the analog clock moves progressively with the passing of minutes I changed the function updateClock replacing the line: document.getElementById('hour').style.webkitTransform = 'rotate(' + (270 - (Clock.getValue(Clock.Hour, {'short': true, 'alternative': !alternativeHoursMode}) * (alternativeHoursMode ? -15 : -30))) + 'deg)'; with: document.getElementById('hour').style.webkitTransform = 'rotate(' + ( 270 - (Clock.getValue(Clock.Hour, {'short': true, 'alternative': !alternativeHoursMode}) * (alternativeHoursMode ? -15 : -30)) - (Clock.getValue(Clock.Minute, {'short': true, 'alternative': !alternativeHoursMode}) / (alternativeHoursMode ? -4 : -2)) ) + 'deg)'; Cheers
lOOKs great with Geo-sans lite....nice! The aforementioned problem is a matter of syncing with KDE time settings. It is a redundant setting users need only toy around between the two to get it right. I've beeeeeen using it thanX!
Is it possible to make the vertical clock configurable? The ability to hide elements like seconds, day, year, and choose the font would be great. Nice work BTW!
I've just seen "Momentum", a landing page for the Google Chrome browser. It shows a clock and below the clock "Good morning", "Good afternoon" etc. according to the current time, followed by the user's name. Might this also be possible with Adjustable Clock? https://chrome.google.com/webstore/detail/momentum/laookkfknpbbblfpciffpaejjkokdgca
Yes (except getting name of current user), it would have to react to event generated on hour change, do value comparison and substitute value.
I am running KDE 4.11.3 on Kubuntu 13.10. I installed Adjustable Clock from repositories. I have created my own theme that displays Short Day name (Wed), Date (15), Short Month Name (Jan) and Time (10:21). When I suspend the computer the previous day, the next day on waking up from suspend, the Day name and Date is not updated. But time is. Could you please suggest a remedy?
Is it current version? Similar issues were fixed recently, in 4.1.3.
Sure. I have been using older version. The problem with the latest version is: it does not show up in Get Hot New Stuff dialog on my computer. When I tried downloading it from kde-look.org, the Ubuntu link (emdek.pl) is not working :( And I am a complete newbie here --- unable to get hang of make, install and other stuff
It's binary applet, these cannot be distributed using GHNS due to compatibility reasons... What exactly doesn't work for you? Page itself or downloaded package? There are only packages for 64 bit, newest being plasma-widget-adjustableclock_4.1.4_amd64.deb.
I am using Kubuntu 13.10, so I clicked on the download link for (K)Ubuntu --- http://kde-apps.org/content/download.php?content=92825&id=5&tan=46417879 On clicking that link, another tab opens asking me ta wait while the download begins. It never does. There is a link on that new tab --- to be clicked if the download does not begin: http://emdek.pl/tests/plasmoids/ This link does not work. Lastly, if the .deb package at the end of it all is a binary for 64-bit systems, it will not help me. I am using a 32-bit system. Can you suggest some way in which I can get the latest Adjustable Clock? Thanks!!
Nope, they sync with Debian so they have outdated version: http://packages.ubuntu.com/trusty/kde/plasma-widget-adjustableclock
You can try to compile it. ;-) It's not that hard but you will have to install some packages first: cmake, gcc, kdelibs5-dev, kdebase-workspace-dev. Then run install.sh in Konsole and that should be enough. Your IP might be blocked on the server, you can send me it using private message, so I could ask administrators to unlock it.
Well, OK. Will try compiling. But on second thoughts, Kubuntu 14.04 is just a few weeks away. Will it contain the latest binary? In that case, will rather wait a few weeks!
Great Work, thank you.
Apologies if there is a better place to file this. I did not find any. It took a little while to realize that proper ISO Week number is component="Week", but it works. Now, however, I find the number is not updating on Monday mornings. Each week, I need to change themes back and forth or reboot (well, there are other options between the two) to get the week number to update. Otherwise, it just keeps displaying whatever the value of the ISO week was when it was last altered or started.
Confirmed, somehow I have missed this one when preparing rules to fire update event... Should be fixed in git now, thanks for report. :-) BTW, it should be enough to use mouse wheel over applet and temporarily change timezone. ;-)
OK, I added the time zone to the label and this morning, when the netbook woke from sleep, the clock displayed the London time instead of the default Paris zone. No idea why, it happens rarely, and seems to be after the wake from sleep. Andrew
I have no idea, it might be Plasma returning invalid configuration values, but I've seen such things (invalid configuration values, returning defaults) only in plasmoidviewer when there is no configChanged() method implemented (or clockConfigChanged() in case of clocks). Although it should mess up other settings too... I'm afraid that there is need to do some debugging. I can prepare special version that would write debug data to log file, to find out culprit.
OK, but is seems to be very rare, and random. One other point is that it remains on the wrong time zone until it is manually reset. Don't know if that is relevant though. Andrew