This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[SOLVED] Custom date format in new digital clock plasmoid

Tags: None
(comma "," separated)
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
I upgraded from Plasma 5.3.2 to 5.4.0. I quite like the new digital clock. Instead of cramming the date below the time, it's on the left. This is much more readable for horizontal panels. However, if I want to show the day of the week, I'm forced to use the "Long Date" format. This makes the plasmoid very wide. I'd prefer something like "Tue 1/9". It looks like customisation is something that a few people want.

In the meantime, if you want to hack the source, you can patch `/usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml` as follows.

Code: Select all
--- DigitalClock.qml.orig   2015-08-22 20:45:40.000000000 +1000
+++ DigitalClock.qml   2015-09-01 09:32:35.417197582 +1000
@@ -515,7 +515,7 @@
 
         if (main.showDate) {
             if (main.tooSmall) {
-                dateLabelLeft.text = Qt.formatDate(main.currentTime, main.dateFormat);
+                dateLabelLeft.text = Qt.formatDate(main.currentTime, "ddd d");
             } else {
                 dateLabel.text = Qt.formatDate(main.currentTime, main.dateFormat);
             }


The format for the date is here.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]