Skip to content

clocket@tirtha: Version 3.0.0#1745

Merged
claudiux merged 45 commits into
linuxmint:masterfrom
KopfdesDaemons:clocket
Apr 4, 2026
Merged

clocket@tirtha: Version 3.0.0#1745
claudiux merged 45 commits into
linuxmint:masterfrom
KopfdesDaemons:clocket

Conversation

@KopfdesDaemons

Copy link
Copy Markdown
Contributor

This desklet needs refactoring. There are several critical issues that severely limit its usability:

  • The clock doesn't support a 24-hour format.
  • The displayed text isn't translated.
  • The weather forecast temperature is far too high and doesn't reflect reality.
  • The weather isn't loaded by default and only displays dummy data. Even after changing the setting, it doesn't load automatically and requires restarting the desklet or toggling the weather display visibility. This is not user-friendly.
  • The weather doesn't update.
  • Several settings are displayed but not implemented, which is very irritating.
  • The desklet doesn't scale.
  • The temperature unit cannot be changed.
  • The icons are stretched.

@tirtharajsinha I've spent many hours over the last four days reworking this desklet. The code changes are extremely extensive. This is one of my largest pull requests.

I've kept the working functionality and respected the existing look and feel. Please take the time to review my revised version of the desklet.

I see you have a repository with this desklet and a newer version like this one. Since your version never made it into the official repository, the next logical version number is 3.0.0. Don't worry, the features you added are also included in my version.

Here are my changes:

  • added Open-Meteo data service (no API key required)
  • automatic location detection added and set as default
  • show weather on default
  • added setting to switch between Celsius and Fahrenheit
  • added translation for desklet GUI
  • uses the clock-use-24h Cinnamon setting
  • uses the clock-show-seconds Cinnamon setting
  • added line wrapping for weather description
  • added weather refresh interval setting
  • added desklet scale size setting based on system font size
  • added async data fetching
  • refactoring
    • dead code removed
      • unused variables
      • unused functions
      • unused settings
      • removed unused style classes
    • commented-out code removed
    • code formatted
    • prefer const over let
    • prefer let over var
    • more readable names for properties, variables, functions, etc.
    • removed tooltips without additional information
    • renamed settings
    • removed hardcoded weekday and month shorthands
    • updated desklet metadata and fix typo in description
    • removed hardcoded heights and widths in styles
    • renamed stylesheet class names
    • error handling and logging
    • added more code comments
  • added changelog.md
    • previous changes and version numbers extracted from Git history
  • updated README.md
  • updated screenshot
  • retain weather style when toggling the show-weather-data setting
  • caching of Open-Meteo geodata retrieved via city name
  • fix stretched icons
  • added loading text
  • reorganize settings layout
  • added hover effect and tooltips for reload buttons
  • added new settings
    • date font size
    • date text color
    • date accent color
    • date background color
    • weather font size
    • weather forecast background color
    • clock border radius
    • date border radius
    • weather border radius
    • weather forecast border radius
    • hide decorations (set to true by default)
    • show clock setting
    • show date setting
    • custom clock time string
    • custom date time string
    • style presets
      • Translucent
      • Transparent
      • Material Design
      • Metro
      • Mint
  • prepared, updated translation files
  • updated german translation

closes #962
closes #708
closes #729

screenshot

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This is a major version 3.0.0 refactoring of the clocket desklet that addresses numerous critical usability issues including missing weather functionality, lack of translations, no 24-hour clock support, and various UI/UX problems. The PR represents a significant rewrite with extensive new features and improvements.

Changes:

  • Complete refactoring of the desklet code with improved structure, error handling, and async data fetching
  • Added Open-Meteo weather service with automatic location detection, replacing the non-functional default weather setup
  • Comprehensive i18n support with translations for multiple languages and integration with Cinnamon system settings

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
metadata.json Updated version to 3.0.0, fixed typo in description, removed deprecated fields
settings-schema.json Complete reorganization with new tabbed layout and many new customization options
stylesheet.css Simplified CSS with new class names, removed hardcoded dimensions
desklet.js Major refactoring: async weather fetching, Open-Meteo integration, translations, better error handling
po/*.po Updated all translation files with new strings and corrected metadata
CHANGELOG.md New file documenting version history extracted from git history
README.md Rewritten with clearer installation and setup instructions

Comment thread clocket@tirtha/README.md Outdated
@tirtharajsinha

Copy link
Copy Markdown
Contributor

Hello @KopfdesDaemons,

Looks good. Hope that we will see more quality contributions like this in the future.

BR // Tirtha

@github-actions

Copy link
Copy Markdown

Pattern Check Results

Found 1 potential issue(s):

ℹ️ shell_string_spawn

clocket@tirtha/files/clocket@tirtha/desklet.js:200

Util.spawnCommandLine("xdg-open https://cinnamon-spices.linuxmint.com/strftime.php");

Prefer argument vector spawn functions over shell command strings.
This is especially important when arguments include untrusted input (user data,
filenames, settings values, etc.) as shell strings are vulnerable to injection.
Static command strings are generally fine, but argv is always safer.
Use Util.spawn(["cmd", "arg1", "arg2"]) or Util.trySpawn() instead.


Automated pattern check.

@github-actions

github-actions Bot commented Apr 4, 2026

Copy link
Copy Markdown

Best-practices scanner

This is a regex-based check for API usage that can pose security, performance or
maintainability issues, or that may already be provided by Cinnamon. Having code flagged
by it doesn't automatically disqualify a pull request.

This check is not perfect will not replace a normal review.


Found 2 potential issue(s):

⚠️ hardcoded_data_dir

clocket@tirtha/files/clocket@tirtha/desklet.js:28

Gettext.bindtextdomain(UUID, GLib.get_home_dir() + "/.local/share/locale");

Avoid hardcoding .local/share in paths. Use GLib.get_user_data_dir() instead,
which respects the XDG_DATA_HOME environment variable.

ℹ️ shell_string_spawn

clocket@tirtha/files/clocket@tirtha/desklet.js:200

Util.spawnCommandLine("xdg-open https://cinnamon-spices.linuxmint.com/strftime.php");

Prefer argument vector spawn functions over shell command strings.
This is especially important when arguments include untrusted input (user data,
filenames, settings values, etc.) as shell strings are vulnerable to injection.
Static command strings are generally fine, but argv is always safer.
Use Util.spawn(["cmd", "arg1", "arg2"]) or Util.trySpawn() instead.


Automated pattern check.

@github-actions

github-actions Bot commented Apr 4, 2026

Copy link
Copy Markdown

Best-practices scanner

This is a regex-based check for API usage that can pose security, performance or
maintainability issues, or that may already be provided by Cinnamon. Having code flagged
by it doesn't automatically disqualify a pull request.

This check is not perfect will not replace a normal review.


Found 1 potential issue(s):

ℹ️ shell_string_spawn

clocket@tirtha/files/clocket@tirtha/desklet.js:200

Util.spawnCommandLine("xdg-open https://cinnamon-spices.linuxmint.com/strftime.php");

Prefer argument vector spawn functions over shell command strings.
This is especially important when arguments include untrusted input (user data,
filenames, settings values, etc.) as shell strings are vulnerable to injection.
Static command strings are generally fine, but argv is always safer.
Use Util.spawn(["cmd", "arg1", "arg2"]) or Util.trySpawn() instead.


Automated pattern check.

@claudiux claudiux merged commit 07f2142 into linuxmint:master Apr 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desklet clocket@tirtha Can't Change Degree on Clocket clocket (clocket@tirtha): Not retrieving weather information from openweathermap

4 participants