How to show seconds on SDDM and Lock Screen in KDE Plasma 6?

It worked in KDE Plasma 5 by editing the Clock.qml file in

/usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/components/Clock.qml
/usr/share/sddm/themes/breeze/components/Clock.qml

By adding

Qt.formatTime(timeSource.data["Local"]["DateTime"], "hh:mm:ss AP")

Now the Clock.qml file has moved to

/usr/lib/qt/qml/SddmComponents/Clock.qml
/usr/lib/qt6/qml/SddmComponents/Clock.qml
/usr/lib/qt6/qml/org/kde/breeze/components/Clock.qml

And the edit doesn’t work anymore.

2 Likes

If anyone stumbles upon this, I got it to work in the reddit thread. Here’s a step-by-step solution:

(all as user; you may need to adjust the paths to the system files to where your distribution keeps them - this is for kubuntu/neon)

  1. cp /usr/share/sddm/themes/breeze ~/breezeseconds
  2. cp /usr/lib/x86_64-linux-gnu/qt6/qml/SddmComponents/Clock.qml ~/breezeseconds/Clockseconds.qml
  3. kate ~/breezeseconds/Clockseconds.qml, search-and-replace “hh:mm” with “hh:mm:ss” (should be exactly one hit)
  4. kate ~/breezeseconds/Main.qml, search-and-replace “Clock” with “Clockseconds” (should be exactly one hit)
  5. cd; sddm-greeter-qt6 --test-mode --theme=breezeseconds

You should now see the greeter with seconds.

I haven’t tested this part, but to install it on the system rather than testing, I think you can just edit the Metadata.desktop to give it a different name (so you’ll know which is which) through the Name field, including the one for your language if applicable, and copy the whole directory to /usr/share/sddm/themes.

1 Like

Why did the moderator delete your comments on Reddit?

Wow, seems like reddit banned me for some reason, and I have no idea why. Thanks for pointing it out to me. I have registered an appeal, let’s see what happens. Shame, I had some guides and technical support on there that might have been useful for people in the future.

Anyway, did it work for you?

1 Like

Yes, but I used the solution from my post on the EndeavourOS forum instead. I’m not allowed to post a link to it.