Dual Datetime

UUID: dual-datetime@rcalixte
Last edited:
2 weeks ago 2024-04-18, 09:46
Last commit: [62a88835] dual-datetime@rcalixte: Add Dutch translation (#1117)

A highly customizable clock desklet that can display dual datetime strings

README

Close

DUAL DATETIME

This is a simple desklet to display two datetime strings, defaulting to the time and date. The size and format of each are configurable by changing the values in the settings.

DESCRIPTION

Adjust the following options for each datetime value using the settings:

  • Time Format
  • Time Alignment (per Layout)
  • Font
  • Color
  • Size

Additional desklet options include:

  • Fixed Width
  • Layout (Vertical or Horizontal)
  • Show Decorations
  • Background Color

The datetime format are from the JavaScript toLocaleFormat function and the possible values can be found locally in the terminal with:

  $> man date

or online at: date Manual

It is also possible to test string outputs in the terminal using the date command and then copy the desired option to the settings input:

  $ date +"%-H:%M"
  14:27

For example, to add seconds to the first time format, append :%S like so:

  "Format": "%-H:%M:%S"

CONFIGURATION

It is possible to set a single datetime string for both the time and date if desired. If the Format field is blank for either format field, that value will be reset to the locale's default time (first string) or date (second string).

COMPATIBILITY

This applet has been tested to be compatible with Cinnamon 5.6+ but is supported for Cinnamon 5.4+.

CHANGELOG

Open

Log In To Comment!

10 Comments

Alan
Alan-2 weeks ago
I use a border and a fixed width. However 12:55pm Wed Mar 30 is much larger then 1:11pm Fri Jul 1 It would be nice to have the space scale to the string when using horizontal.
Rick Calixte
Rick Calixte-2 weeks ago
Hi, there are CSS options to configure the spacing but unfortunately none are currently supported in Cinnamon. I'm continuously looking for areas to improve and I'll add this to the list of things to consider when possible. One workaround is that you can use a monospace font and use zero-padding for the date and hour fields. This will ensure that the space used is consistent for all time values that are being displayed.
FallonBlue
FallonBlue-3 months ago
Love your desklet, by far my favorite clock desklet! Is there a way to override the desktop theme and to not have shadows? I'm not able to have a transparent desklet currently. Fairly new to Linux, so could be user error. I can make the background work by choosing a color that is close to my desktop color, but would like actual transparency, if possible. Thank you!
Rick Calixte
Rick Calixte-3 months ago
There is! It's not very intuitive until you see it but the default color chooser supports transparency at the bottom, so you can use transparency for the font color and/or the background color. 1. Once you select a color, right-click on it and select Customize. 2. There is a bar at the bottom, below the color window but above Cancel and Select. You can slide the knob manually but you can also right-click on it to select the transparency value. (100 is solid, 0 is the same as having the Show decorations option turned off.) 3. That's it! Enjoy!
Paul Birkholtz
Paul Birkholtz-5 months ago
I love this desklet! Sometimes the decoration randomly appears and I can't get it to go away without spinning up a new instance, luckily I just import my settings with JSON.
Rick Calixte
Rick Calixte-5 months ago
Thank you for the kind words! Can you expand on the issues you're seeing with the decorations? If it would be easier, you can open an Issue on the repository (using the Issues button on top of the page here) and attach some screenshots and hopefully we can get it resolved quickly.
angelotux
angelotux-6 months ago
change FONT?
Rick Calixte
Rick Calixte-6 months ago
Yes, that is one of the options. Are you encountering an issue? Was this just a general question?
Boyfinn
Boyfinn-1 month ago
User installed system fonts (.ttf) don't work. The font family seems to be recognized, as the font at least changes if the family name gets typed in correctly, but it only changes to a default font (Arial?), And not the custom installed font. Tried installing fonts to "/home/usr/share/fonts/" and tried also installing via FontManager.
Alan
Alan-2 weeks ago
I have no issues with installed custom fonts. Toledo is my favorite for this. Just put them in ~/.fonts period fonts hidden folder. I'm surprised font manager doesn't work.