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.
I see that you’ve asked this exact question in the place it’s most likely to be answered.
The KDE forum: https://discuss.kde.org/t/how-to-show-seconds-on-sddm-and-lock-screen-in-kde-plasma-6/11778
Based on several forums, it seems the method you tried is the only publicly known method at the moment. This means your best chance of getting a solution is from someone who works with KDE more directly.
1 Like
jake99
June 17, 2024, 1:26am
3
Hello, not sure why editing Clock.qml
does not work any more, but you can easily use your own components with QML and override almost everything
The following works for me:
Disclaimer
I'm using Fedora Rawhide and KDE 6.1 beta, but it should work on EnOS too
Operating System: Fedora Linux 41
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.10.0-0.rc3.32.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 20 × 13th Gen Intel® Core™ i7-13700H
Memory: 15.3 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4060 Laptop GPU/PCIe/SSE2
Manufacturer: LENOVO
Product Name: 82YA
System Version: Legion Slim 5 16IRH8
For lock screen:
copy Clock.qml
breeze component to lockscreen package as MyClock.qml
sudo cp /usr/lib/qt6/qml/org/kde/breeze/components/Clock.qml /usr/share/plasma/shells/org.kde.plasma.desktop/contents/lockscreen/MyClock.qml
adjust your formats in MyClock.qml
edit LockScreenUi.qml
and replace the component Clock
with MyClock
; it’s on line 219 on my system
It’s similar for SDDM (I’m using SDDM theme 01-breze-fedora
):
copy Clock.qml
component to SDDM theme as MyClock.qml
sudo cp /usr/lib/qt6/qml/org/kde/breeze/components/Clock.qml /usr/share/sddm/themes/01-breeze-fedora/MyClock.qml
adjust your formats in MyClock.qml
edit Main.qml
in themes folder, and like before, replace Clock
with MyClock
component.
Custom lockscreen clock
3 Likes
system
Closed
June 21, 2024, 3:15am
4
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.