Make Ubuntu Calendar Icon Show The Current Date And Time
Ever noticed that the calendar app icon on macOS and iOS always shows the current (and correct) date?
It’s one of those subtle, unassuming features that goes unnoticed by most. But when you’re aware of it you can’t help but think: “heh, that’s actually kinda neat”.
Well, now you can get a similar feature on the Ubuntu desktop too.
Ubuntu’s Calendar Icon: It’s Always the 28th
Ubuntu uses the Yaru icon set by default. On a vanilla system the Yaru icon for the GNOME Calendar app is a mock flip calendar displaying the number ’28’. No matter the actual date the icon resolutely conveys the number 28.
Is this an issue?
Well, no. So you can stop yelling “Joey, Ubuntu shows the date at the top of the screen. If I need to see it, I can” cos I hear you, my friend.
But… there’s something deliciously effortless about being able to glance at the calendar icon on the Ubuntu Dock to glean the current date. It makes the system feel a little more alive, somehow. Plus, since I’ve gone all-in with the Apple comparisons thus far, macOS shows it in both places too, so if it’s good enough for them…
A Nifty Script Appears
Developer SebLisic has a script up on his GitHub. When run it refreshes Ubuntu’s calendar to show the current date instead of the number ’28’. When the date changes in the real world the date changes on the icon. I would say it’s magic but it’s actually a bit of
systemd scheduling .
Seb’s script also offers customisation abilities that the Apple analog does not. You can choose to see the name of the day rather than month in the icon, or see the correct month/day name based on your locale rather than a default of English. Bon!
But what I love most about this particular script is how non-invasive it is. It leaves system files untouched, it doesn’t require sudo, and doesn’t pull in the sort spaghetti-tangle of dependencies similar hacks I’ve covered in the past have.
Before you scroll away to grab the script and try it out I oughta mention a few things.
First up, this script only works on Ubuntu 22.04 LTS with the Yaru icon theme. If you use an older version of Ubuntu or pick a different icon pack then be aware things may not work, and even if it appears to something could go askew.
Secondly — and this could be a deal breaker for some — this script uses a different calendar icon to the stock Yaru calendar icon. You still get a Yaru-shaped replacement that uses the Ubuntu font and adapts to Ubuntu 22.04’s system accent colours, but it’s not the flip calendar aesthetic some folks dig.
Finally, once you have this up and running, be aware that every time you open the Settings app the GNOME Calendar icon reverts back to the standard Yaru calendar icon. The workaround (for now) is to run
systemctl --user start update_calendar_icon.service if this happens, or wait for the date the change normally.
Get The Script!
You can find the script and the steps needed to use it on SebLisic’s GitHub page. As well as step-by-step install instructions (tl;dr install git, clone repo, run script) it covers the undo process too, should you want to un-do and return to a vanilla setup. There’s also an FAQ you should absolutely read because that’s what smart people do.
Last but not least, the grown up bit: while I used this script to no ill-effect on my desktop sensible people don’t run scripts they find online blindly or idly. That’s never a good idea™. Always check things over yourself to satisfy your sensibilities before running ahead.