Skip to content

Add Work Timer desklet#1854

Open
imanilchaudhari wants to merge 4 commits into
linuxmint:masterfrom
imanilchaudhari:add-worktimer
Open

Add Work Timer desklet#1854
imanilchaudhari wants to merge 4 commits into
linuxmint:masterfrom
imanilchaudhari:add-worktimer

Conversation

@imanilchaudhari

Copy link
Copy Markdown
Contributor

Work Timer (worktimer@imanilchaudhari)

A desklet for tracking work sessions with automatic reminders as time runs out.

Features

  • Countdown clock (HH:MM or HH:MM:SS) with colour-coded progress bar (green → amber → orange → red)
  • Desktop notifications at fixed milestones: 1 hour, 30 min, 15 min, 5 min, 1 min remaining
  • Periodic reminders on a configurable interval (5, 15, 30, or 60 min)
  • Optional sound alert using built-in system sounds (freedesktop theme)
  • Start, Pause, and Reset controls

Settings

  • Working hours (1–16)
  • Reminder interval
  • Show/hide seconds
  • Sound on/off + sound picker

Checklist

  • metadata.json with uuid, name, description, version, author
  • settings-schema.json
  • stylesheet.css
  • info.json
  • README.md
  • screenshot.png

@github-actions

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. Most findings
are advisory and do not automatically disqualify a pull request.

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


Found 2 potential issue(s):

⚠️ WARNING

⚠️ sync_file_query_exists

cinnamon-spices-desklets/worktimer@imanilchaudhari/files/worktimer@imanilchaudhari/desklet.js:173

if (f.query_exists(null))

query_exists() is a synchronous call that can block on slow/network filesystems.
Prefer attempting the operation and handling a Gio.IOErrorEnum.NOT_FOUND error instead.

ℹ️ INFO

ℹ️ shell_string_spawn

cinnamon-spices-desklets/worktimer@imanilchaudhari/files/worktimer@imanilchaudhari/desklet.js:174

GLib.spawn_command_line_async('paplay ' + this.reminderSound);

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

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. Most findings
are advisory and do not automatically disqualify a pull request.

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


Found 2 potential issue(s):

⚠️ WARNING

⚠️ sync_file_query_exists

worktimer@imanilchaudhari/files/worktimer@imanilchaudhari/desklet.js:173

if (f.query_exists(null))

query_exists() is a synchronous call that can block on slow/network filesystems.
Prefer attempting the operation and handling a Gio.IOErrorEnum.NOT_FOUND error instead.

ℹ️ INFO

ℹ️ shell_string_spawn

worktimer@imanilchaudhari/files/worktimer@imanilchaudhari/desklet.js:174

GLib.spawn_command_line_async('paplay ' + this.reminderSound);

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.

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.

1 participant