Source i (link to git-repo or to original if based on someone elses unmodified work):

https://github.com/laloch/kwin-effect-osdclock.git

4
Become a Fan
6.8

Description:
KWin effect that displays clock at the corner of the screen

Ratings & Comments

25 Comments

ben2talk

Remove Rating

ben2talk

Won't build now - she's dead, Jim.

ben2talk

For Manjaro, just do 'yay kwin-effects-osdclock'. Too easy ;)

gzu

Hi Baltasar, looks like it no longer compiles in Fedora 31, possibly due to qt5 updates from /root/rpmbuild/BUILD/kwin-effect-osdclock-master/x86_64-redhat-linux-gnu/src/kwin_osdclock_autogen/mocs_compilation.cpp:2: /usr/include/qt5/QtCore/qmetatype.h:1971:1: note: forward declaration of 'class QFont' 1971 | QT_FOR_EACH_STATIC_GUI_CLASS(QT_FORWARD_DECLARE_STATIC_TYPES_ITER) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /root/rpmbuild/BUILD/kwin-effect-osdclock-master/src/osdclock.cpp:22: /root/rpmbuild/BUILD/kwin-effect-osdclock-master/src/osdclock.h:89:11: error: field 'textFont' has incomplete type 'QFont' 89 | QFont textFont; | ^~~~~~~~ In file included from /usr/include/qt5/QtCore/qobject.h:54, from /usr/include/qt5/QtCore/qcoreapplication.h:46, from /usr/include/qt5/QtCore/QCoreApplication:1, from /usr/include/kwinglobals.h:24, from /usr/include/kwineffects.h:29, from /root/rpmbuild/BUILD/kwin-effect-osdclock-master/src/osdclock.h:27, from /root/rpmbuild/BUILD/kwin-effect-osdclock-master/src/osdclock.cpp:22: /usr/include/qt5/QtCore/qmetatype.h:1971:1: note: forward declaration of 'class QFont' 1971 | QT_FOR_EACH_STATIC_GUI_CLASS(QT_FORWARD_DECLARE_STATIC_TYPES_ITER) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /root/rpmbuild/BUILD/kwin-effect-osdclock-master/src/osdclock.cpp:22: /root/rpmbuild/BUILD/kwin-effect-osdclock-master/src/osdclock.h:66:38: error: return type 'class QFont' is incomplete 66 | QFont configuredTextFont() const { | ^ /root/rpmbuild/BUILD/kwin-effect-osdclock-master/src/osdclock.cpp: In member function 'virtual void OsdClockEffect::reconfigure(KWin::Effect::ReconfigureFlags)': /root/rpmbuild/BUILD/kwin-effect-osdclock-master/src/osdclock.cpp:78:30: error: invalid use of incomplete type 'class QPalette' 78 | textColor = QPalette().color(QPalette::Active, QPalette::WindowText); | ^ In file included from /usr/include/qt5/QtCore/qobject.h:54, from /usr/include/qt5/QtCore/qcoreapplication.h:46, from /usr/include/qt5/QtCore/QCoreApplication:1, from /usr/include/kwinglobals.h:24, from /usr/include/kwineffects.h:29, from /root/rpmbuild/BUILD/kwin-effect-osdclock-master/src/osdclock.h:27, from /root/rpmbuild/BUILD/kwin-effect-osdclock-master/src/osdclock.cpp:22: /usr/include/qt5/QtCore/qmetatype.h:1971:1: note: forward declaration of 'class QPalette' 1971 | QT_FOR_EACH_STATIC_GUI_CLASS(QT_FORWARD_DECLARE_STATIC_TYPES_ITER) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /root/rpmbuild/BUILD/kwin-effect-osdclock-master/src/osdclock.cpp:78:48: error: incomplete type 'QPalette' used in nested name specifier 78 | textColor = QPalette().color(QPalette::Active, QPalette::WindowText); | ^~~~~~ /root/rpmbuild/BUILD/kwin-effect-osdclock-master/src/osdclock.cpp:78:66: error: incomplete type 'QPalette' used in nested name specifier 78 | textColor = QPalette().color(QPalette::Active, QPalette::WindowText); | ^~~~~~~~~~ make[2]: *** [src/CMakeFiles/kwin_osdclock.dir/build.make:74: src/CMakeFiles/kwin_osdclock.dir/kwin_osdclock_autogen/mocs_compilation.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [src/CMakeFiles/kwin_osdclock.dir/build.make:87: src/CMakeFiles/kwin_osdclock.dir/plugin.cpp.o] Error 1 make[2]: *** [src/CMakeFiles/kwin_osdclock.dir/build.make:100: src/CMakeFiles/kwin_osdclock.dir/osdclock.cpp.o] Error 1 make[2]: Leaving directory '/root/rpmbuild/BUILD/kwin-effect-osdclock-master/x86_64-redhat-linux-gnu' make[1]: *** [CMakeFiles/Makefile2:185: src/CMakeFiles/kwin_osdclock.dir/all] Error 2 make[1]: Leaving directory '/root/rpmbuild/BUILD/kwin-effect-osdclock-master/x86_64-redhat-linux-gnu' make: *** [Makefile:144: all] Error 2 make: Leaving directory '/root/rpmbuild/BUILD/kwin-effect-osdclock-master/x86_64-redhat-linux-gnu' error: Bad exit status from /var/tmp/rpm-tmp.BtB9d3 (%build)

laloch

Hi gzu, I'm David in fact, but that doesn't really matter ;) I believe that I have already pushed a fix for the compilation issue you are reporting back in September. Could you please pull the latest version from GitHub and try to build again?

gzu

Thanks David, I'll know to check the git repo for changes from now on.

baltolkien

9 +Great effect

laloch

Hi Baltasar, thanks for your kind words and for the nice blog post!

goodtrailer

9 really nice how it's always on top pro tip: if you want 12hr time, change line 221 in osdclock.cpp to: path.addText(0, 55, textFont, t.toString("hh:mm a").remove(6, 3)); note: it doesn't show "am" or "pm", just the time in 12hr

goodtrailer

(for anyone else who wants 12hr time and is impatient :p)

laloch

Hi goodtrailer, thanks for suggestion. I don't really maintain the plugin much beyond occasional bug fixes. In the future I'll most probably implement time formatting according to the configured user locale.

onetuser

Hello, Could not figure out how to make this working on Ubuntu 17. I've managed to build the project, but what to do with generated files: /usr/lib/plugins/kwin/effects/plugins/libkwin_osdclock.so /usr/lib/plugins/kwin/effects/configs/kwin_osdclock_config.so There is no osdclock in Settings->Desktop behavior. Thanks.

laloch

Hi onetuser, OSD Clock is a KWin effect plugin, so you should see its configuration UI in "Desktop Effects" category. I have just uploaded a screenshot of System Settings application window for you to see what it should look like.

onetuser

Yes, i do not see it in "Desktop Effects" even after reboot. Are those two files enough? No need to add anything to /usr/share/kwin/effects/ or somewhere or edit some config files?

laloch

You are right. There's something wrong with Qt5 environment on Ubuntu 17. Just do `sudo mv /usr/lib/plugins/kwin /usr/lib/x86_64-linux-gnu/qt5/plugins` and you should be fine.

onetuser

It worked, thank you!

flaviobue

9 Thanks! I love it. I even use it with Raleway font as on the screenshot. Scaling, however, doesn't work well on HiDPI displays.

laloch

Thanks for the feedback. I know about the HiDPI issue. I've already noticed it on my FHD+ display. I can imagine that it looks much worse in 4K. I'll try to fix it soon.

gzu

Hi, For Fedora I changed the cmake command to cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib64/qt5 .. Also "src/CMakeFiles/kwin_osdclock_config.dir/build.make" didn't seem to have the full path to org.kde.kwin.Effects.xml. I edited it to "/usr/share/dbus-1/interfaces/org.kde.kwin.Effects.xml" (in 2 places) before running make. Thanks, GZU

laloch

Hi GZU, thanks for explanation. I should update the build instructions to point out the differences between distributions. Regarding the interface declaration XML: It's strange. Could you please post the output of 'pkg-config --variable=interfaces_dir dbus-1'? Thanks

gzu

Hi laloch, running 'pkg-config --variable=interfaces_dir dbus-1' gives no output on Fedora 28. Cheers

laloch

Indeed! On Fedora you need to install dbus-devel package. On Debian/Ubuntu it's libdbus-1-dev. I'll update the README accordingly. Thanks for reporting!

gzu

9 +

gzu

Nice kwin clock, good replacement for beclock (which I used in KDE4). I had a couple of issues getting it to work in Fedora but nothing I couldn't work around. Thanks, GZU

laloch

Thanks, you're very kind. I made it for myself years ago when our good old BeClock died along with Plasma 4. They even share some parts of code (specifically the blur effect). Would you mind sharing the issues you had in Fedora? Or perhaps even better please file a bug report(s) over at GitHub if you think there's something I should fix.

Pling
0 Affiliates
Details
license GPLv2 or later
version
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 1

Other Kwin Effects:

Sliding Plasma tooltips
nowrep
last update date: 9 years ago

Score 6.1

Maximize
mgraesslin
last update date: 12 years ago

Score 7.0

Activity Switching Effect
ivancukic
last update date: 12 years ago

Score 7.2

Zoom Desktop
kbroulik
last update date: 12 years ago

Score 7.3

kwin theme dark face
edoard
last update date: 8 years ago

Score 5.7

Grayscale Effect
murat-cileli
last update date: 2 years ago

Score 7.9