Dual Datetime

UUID: dual-datetime@rcalixte
Last edited:
1 week ago 2024-10-02, 09:31
Last commit: [dc373576] Hungarian translation update for Cinnamon Desklets (#1299)

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 Family
  • Color
  • Font Weight
  • 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!

19 Comments

ayubiuri
ayubiuri-1 day ago
hi, how do i take off background, turning it into transparent?
Rick Calixte
Rick Calixte-13 hours ago
At the bottom of the options, there is an option named "Show decorations" that you can disable. The other way is via the color chooser and tuning the value for Alpha to 0.
Blue-Sauce
Blue-Sauce-3 days ago
Hi, how can I create the time and date as shown in the bottom left of the screenshot? Specifically, 3 different sizes, and with just the day colored. The example shows a large time, small red colored day "15", white colored month and year, and below that, in a 3rd size, the day of the week.
Rick Calixte
Rick Calixte-3 days ago
Hi, there's another desklet that offers this as a preset, including the font (GE Inspira). I borrowed that font and layout as a way of demonstrating the flexibility of the settings here. To accomplish that example in the screenshot, I used three instances: 1. the clock: "%-l:%M %p" (font size: 8.0), width: 410 px 2. the date and month with the year: "%-d" (font size: 2.0, font color: orange) and "%-B %Y" (font size: 2.0), width: 200px 3. the day of the week: "%-A" (font size: 4.0), width: 210px
muhammadanasajjad
muhammadanasajjad-2 months ago
Great desklet very useful. But I do have one issue that when I have a day like Wednesday with "%A" I would like to capitalize it how can I do this?
muhammadanasajjad
muhammadanasajjad-2 months ago
https://postimg.cc/jLq5sMzv I tried the "%^A" but this is what happens
Rick Calixte
Rick Calixte-2 months ago
Hello, this functionality works but it depends on what version of GLib you have installed on your system. The "^" for specific fields was added in 2.79 and later versions. For Debian, this will be Debian 13 (Trixie) and newer. For Ubuntu, this will be 24.04 and newer. For Mint, this will be 22.0 and newer. For Arch-based or Fedora-based distributions, you would need to be on the latest releases. I hope this helps!
angelotux
angelotux-4 months ago
Is it possible to insert the mxlinux type version?
Rick Calixte
Rick Calixte-4 months ago
Can you expand on what you mean here? If possible, if you could open a feature request at the Issues link above?
Alan
Alan-5 months 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-5 months 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-8 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-8 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-10 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-10 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-11 months ago
change FONT?
Rick Calixte
Rick Calixte-11 months ago
Yes, that is one of the options. Are you encountering an issue? Was this just a general question?
Boyfinn
Boyfinn-6 months 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-5 months 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.