# An imagemagick clock

**URL:** <https://discuss.kde.org/t/an-imagemagick-clock/47269>\
**Category:** Tips and Tricks\
**Tags:** desktop\
**Created:** [May 24, 2026, 10:06am UTC](https://discuss.kde.org/t/an-imagemagick-clock/47269 "2026-05-24T10:06:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jinliu](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/jinliu/32/2414_2.png) [@jinliu](https://discuss.kde.org/u/jinliu)\
**Post date:** [May 24, 2026, 10:06am UTC](https://discuss.kde.org/t/an-imagemagick-clock/47269/1 "2026-05-24T10:06:37Z")

</div>

The clock widget has a never-ending list of feature requests.

Then we have HTML Clock where you can have any layout you want, if you know some HTML:

> **[HTML Clock for Plasma 6](https://store.kde.org/p/1473016)**
>
> Clock widget you can layout and style using HTML/CSS for Plasma 6 / KDE! \>----\>\>\>\> PLEASE use GITHUB.com to request new features or report any bugs. If you...

Then I just realized that you can have an ultimate-customizable, pixel-perfect clock with ImageMagick. The clock widget just needs to call a small script like this every minute, and reload the generated picture:

```auto
#!/usr/bin/python3

import sys, time, subprocess

if len(sys.argv) <= 1:
    print("Usage: {} <output_file>".format(sys.argv[0]))
    sys.exit(1)
 
output_file = sys.argv[1]
t = time.localtime()
hour = t.tm_hour
minute = t.tm_min
day = t.tm_mday
month = t.tm_mon
year = t.tm_year

command = f'''magick -size 300x110 canvas:transparent -draw 'rectangle 0,0 300,110' -pointsize 128 -font '7-Segment' -fill '#FF2400' -draw 'text 0,104 "{hour:02d}"' -fill white -pointsize 84 -draw 'text 116,104 ":{minute:02d}"' -fill '#FF2400' -stroke '#FF2400' -strokewidth 5 -draw 'line 220,0 220,110' -strokewidth 0 -stroke none -fill white -pointsize 32 -draw 'text 230, 30 "{day:02d}"' -draw 'text 230, 64 "{time.strftime("%b", t).upper()}"' -draw 'text 230, 100 "{year}"' {output_file}'''
subprocess.run(command, shell=True)

```

 ![clock](https://discuss-cdn.kde.org/uploads/default/original/3X/f/4/f4934d126f3a70b5c60c12c9e5bb16dca6b70dae.png)

Yeah, you need to know ImageMagick. Not a big issue if you are _that_ into customization…

---

<div class="post-metadata">

**Author:** ![jinliu](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/jinliu/32/2414_2.png) [@jinliu](https://discuss.kde.org/u/jinliu)\
**Post date:** [May 30, 2026, 6:41am UTC](https://discuss.kde.org/t/an-imagemagick-clock/47269/2 "2026-05-30T06:41:05Z")

</div>

> **[GitHub - jinliu/plasma-magick-clock: A highly customizable clock widget for KDE Plasma](https://github.com/jinliu/plasma-magick-clock)**
>
> A highly customizable clock widget for KDE Plasma
