Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions 1440@jvlianodorneles/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 1440 Cinnamon Applet

## Introduction

The **1440** applet for Cinnamon is a simple and effective tool designed to help you stay focused on productivity by constantly displaying the minutes remaining until the end of the day. It's ideal for students, professionals with tight deadlines, or anyone looking to optimize their daily routine more efficiently.

## Features

- **Daily Countdown:** Displays in real-time the number of minutes left until the day ends.
- **Productivity Focus:** Helps visualize the remaining time, encouraging efficient management of your tasks.
- **Automatic Update:** The counter updates every 60 seconds to ensure accuracy.
- **Intuitive Icon:** Uses an hourglass icon (⌛️) for a clear visual representation.

## Manual Installation on Cinnamon

To manually install the 1440 applet in your Cinnamon environment, follow the steps below:

1. **Navigate to the Cinnamon applets directory:**

Open the terminal and use the `cd` command to go to the folder where Cinnamon applets are stored locally:

```bash
cd ~/.local/share/cinnamon/applets
```

2. **Clone the applet repository:**

Navigate to the Cinnamon applets directory and clone the repository:

```bash
cd ~/.local/share/cinnamon/applets
git clone https://github.com/jvlianodorneles/1440.git 1440@jvlianodorneles
```

4. **Restart Cinnamon (or the panel):**

For Cinnamon to recognize the new applet, you can restart the graphical environment. The easiest way is to press `Alt + F2`, type `r`, and press `Enter`. This will restart Cinnamon without closing your applications.

5. **Add the applet to the panel:**

- Right-click on an empty area of your Cinnamon panel.
- Select "Add applets to panel...".
- In the window that opens, go to the "Installed applets" tab.
- Look for "1440" in the list.
- Select it and click "Add to panel."

Now you should see the "1440" applet displaying the remaining minutes of the day on your Cinnamon panel!
67 changes: 67 additions & 0 deletions 1440@jvlianodorneles/files/1440@jvlianodorneles/applet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
const Applet = imports.ui.applet;
const Mainloop = imports.mainloop;
const Lang = imports.lang;
const Gettext = imports.gettext;
const UUID = "1440@jvlianodorneles";

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

function _(str) {
return Gettext.dgettext(UUID, str);
}

// MyApplet is an instance of Applet.TextApplet.
function MyApplet(orientation, panel_height, instance_id) {
this._init(orientation, panel_height, instance_id);
}

MyApplet.prototype = {
__proto__: Applet.TextApplet.prototype,

_init: function(orientation, panel_height, instance_id) {
Applet.TextApplet.prototype._init.call(this, orientation, panel_height, instance_id);

this.set_applet_tooltip(_("Time remaining until the end of the day"));

this._updateTime();
},

// This function is called when the applet is removed from the panel.
on_applet_removed_from_panel: function() {
// We remove the update loop to avoid memory leaks.
if (this.updateLoop) {
Mainloop.source_remove(this.updateLoop);
}
},

// This function calculates and updates the time remaining in the day.
_updateTime: function() {
try {
// Get the current date.
const now = new Date();

// Create a Date object for the end of the day.
const endOfDay = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59);

// Calculate the difference in milliseconds.
const diff = endOfDay.getTime() - now.getTime();

// Convert the difference to minutes and round it down.
const minutes = Math.floor(diff / (1000 * 60));

// Set the applet text.
this.set_applet_label("⌛️ " + minutes + " " + _("min"));

} catch (e) {
global.logError(e);
this.set_applet_label("Error");
}

// Schedule the next update for 60 seconds in the future.
this.updateLoop = Mainloop.timeout_add_seconds(60, Lang.bind(this, this._updateTime));
}
};

function main(metadata, orientation, panel_height, instance_id) {
return new MyApplet(orientation, panel_height, instance_id);
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions 1440@jvlianodorneles/files/1440@jvlianodorneles/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"uuid": "1440@jvlianodorneles",
"name": "1440",
"description": "Keep a constant track of how many minutes you have left until the day is over",
"version": 0.1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-26 11:32-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.6\n"

#: /home/juliano/.local/share/cinnamon/applets/1440@jvlianodorneles/applet.js:24
msgid "Time remaining until the end of the day"
msgstr ""

#: /home/juliano/.local/share/cinnamon/applets/1440@jvlianodorneles/applet.js:53
msgid "min"
msgstr ""
24 changes: 24 additions & 0 deletions 1440@jvlianodorneles/files/1440@jvlianodorneles/po/en.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
msgid ""
msgstr ""
"Project-Id-Version: 1440@jvlianodorneles\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-25 10:46-0300\n"
"PO-Revision-Date: 2025-10-26 11:32-0300\n"
"Last-Translator: \n"
"Language-Team: English\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.6\n"

#: /home/juliano/.local/share/cinnamon/applets/1440@jvlianodorneles/applet.js:24
msgid "Time remaining until the end of the day"
msgstr "Time remaining until the end of the day"

#: /home/juliano/.local/share/cinnamon/applets/1440@jvlianodorneles/applet.js:53
msgid "min"
msgstr "min"

#~ msgid "Keep a constant track of how many minutes you have left until the day is over, especially if you're someone striving to improve productivity — like students, professionals working with tight deadlines, or anyone trying to organize their daily routine more efficiently."
#~ msgstr "Keep a constant track of how many minutes you have left until the day is over, especially if you're someone striving to improve productivity — like students, professionals working with tight deadlines, or anyone trying to organize their daily routine more efficiently."
24 changes: 24 additions & 0 deletions 1440@jvlianodorneles/files/1440@jvlianodorneles/po/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
msgid ""
msgstr ""
"Project-Id-Version: 1440@jvlianodorneles\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-25 10:46-0300\n"
"PO-Revision-Date: 2025-10-26 11:32-0300\n"
"Last-Translator: \n"
"Language-Team: Spanish\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.6\n"

#: /home/juliano/.local/share/cinnamon/applets/1440@jvlianodorneles/applet.js:24
msgid "Time remaining until the end of the day"
msgstr "Tiempo restante hasta el final del día"

#: /home/juliano/.local/share/cinnamon/applets/1440@jvlianodorneles/applet.js:53
msgid "min"
msgstr "min"

#~ msgid "Keep a constant track of how many minutes you have left until the day is over, especially if you're someone striving to improve productivity — like students, professionals working with tight deadlines, or anyone trying to organize their daily routine more efficiently."
#~ msgstr "Mantenga un seguimiento constante de cuántos minutos le quedan hasta que termine el día, especialmente si es alguien que se esfuerza por mejorar la productividad, como estudiantes, profesionales que trabajan con plazos ajustados o cualquiera que intente organizar su rutina diaria de manera más eficiente."
24 changes: 24 additions & 0 deletions 1440@jvlianodorneles/files/1440@jvlianodorneles/po/hi.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
msgid ""
msgstr ""
"Project-Id-Version: 1440@jvlianodorneles\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-25 10:46-0300\n"
"PO-Revision-Date: 2025-10-26 11:32-0300\n"
"Last-Translator: \n"
"Language-Team: Hindi\n"
"Language: hi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.6\n"

#: /home/juliano/.local/share/cinnamon/applets/1440@jvlianodorneles/applet.js:24
msgid "Time remaining until the end of the day"
msgstr "दिन के अंत तक शेष समय"

#: /home/juliano/.local/share/cinnamon/applets/1440@jvlianodorneles/applet.js:53
msgid "min"
msgstr "मिनट"

#~ msgid "Keep a constant track of how many minutes you have left until the day is over, especially if you're someone striving to improve productivity — like students, professionals working with tight deadlines, or anyone trying to organize their daily routine more efficiently."
#~ msgstr "दिन खत्म होने तक आपके पास कितने मिनट बचे हैं, इसका लगातार ट्रैक रखें, खासकर यदि आप उत्पादकता में सुधार के लिए प्रयासरत हैं - जैसे छात्र, सख्त समय सीमा वाले पेशेवर, या कोई भी जो अपनी दैनिक दिनचर्या को अधिक कुशलता से व्यवस्थित करने की कोशिश कर रहा है।"
24 changes: 24 additions & 0 deletions 1440@jvlianodorneles/files/1440@jvlianodorneles/po/pt_BR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
msgid ""
msgstr ""
"Project-Id-Version: 1440@jvlianodorneles\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-25 19:01-0300\n"
"PO-Revision-Date: 2025-10-26 11:32-0300\n"
"Last-Translator: \n"
"Language-Team: Portuguese (Brazil)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.6\n"

#: /home/juliano/.local/share/cinnamon/applets/1440@jvlianodorneles/applet.js:24
msgid "Time remaining until the end of the day"
msgstr "Tempo restante até o fim do dia"

#: /home/juliano/.local/share/cinnamon/applets/1440@jvlianodorneles/applet.js:53
msgid "min"
msgstr "min"

#~ msgid "Keep a constant track of how many minutes you have left until the day is over, especially if you're someone striving to improve productivity — like students, professionals working with tight deadlines, or anyone trying to organize their daily routine more efficiently."
#~ msgstr "Mantenha um registro constante de quantos minutos você tem até o final do dia, especialmente se você é alguém que se esforça para melhorar a produtividade — como estudantes, profissionais que trabalham com prazos apertados ou qualquer pessoa que tenta organizar sua rotina diária de forma mais eficiente."
32 changes: 32 additions & 0 deletions 1440@jvlianodorneles/files/1440@jvlianodorneles/po/pt_BR.po~
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
msgid ""
msgstr ""
"Project-Id-Version: 1440@jvlianodorneles\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-25 10:46-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Portuguese (Brazil)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: /home/juliano/.local/share/cinnamon/applets/1440@jvlianodorneles/applet.js:24
msgid "Time remaining until the end of the day"
msgstr "Tempo restante até o fim do dia"

#: /home/juliano/.local/share/cinnamon/applets/1440@jvlianodorneles/applet.js:53
msgid "min"
msgstr "min"

msgid ""
"Keep a constant track of how many minutes you have left until the day is "
"over, especially if you're someone striving to improve productivity — "
"like students, professionals working with tight deadlines, or anyone "
"trying to organize their daily routine more efficiently."
msgstr ""
"Mantenha um registro constante de quantos minutos você tem até o final do "
"dia, especialmente se você é alguém que se esforça para melhorar a "
"produtividade — como estudantes, profissionais que trabalham com prazos "
"apertados ou qualquer pessoa que tenta organizar sua rotina diária de "
"forma mais eficiente."
24 changes: 24 additions & 0 deletions 1440@jvlianodorneles/files/1440@jvlianodorneles/po/zh_CN.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
msgid ""
msgstr ""
"Project-Id-Version: 1440@jvlianodorneles\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-25 10:46-0300\n"
"PO-Revision-Date: 2025-10-26 11:32-0300\n"
"Last-Translator: \n"
"Language-Team: Chinese (Simplified)\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.6\n"

#: /home/juliano/.local/share/cinnamon/applets/1440@jvlianodorneles/applet.js:24
msgid "Time remaining until the end of the day"
msgstr "一天结束前的剩余时间"

#: /home/juliano/.local/share/cinnamon/applets/1440@jvlianodorneles/applet.js:53
msgid "min"
msgstr "分钟"

#~ msgid "Keep a constant track of how many minutes you have left until the day is over, especially if you're someone striving to improve productivity — like students, professionals working with tight deadlines, or anyone trying to organize their daily routine more efficiently."
#~ msgstr "持续跟踪一天中剩余的分钟数,特别是对于那些努力提高生产力的人——比如学生、有严格截止日期的专业人士,或者任何试图更有效地组织日常工作的人。"
4 changes: 4 additions & 0 deletions 1440@jvlianodorneles/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"author": "jvlianodorneles",
"license": "GPLv3"
}
Binary file added 1440@jvlianodorneles/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.