diff --git a/1440@jvlianodorneles/README.md b/1440@jvlianodorneles/README.md new file mode 100644 index 00000000000..72eef06c718 --- /dev/null +++ b/1440@jvlianodorneles/README.md @@ -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! \ No newline at end of file diff --git a/1440@jvlianodorneles/files/1440@jvlianodorneles/applet.js b/1440@jvlianodorneles/files/1440@jvlianodorneles/applet.js new file mode 100644 index 00000000000..3851dd1016c --- /dev/null +++ b/1440@jvlianodorneles/files/1440@jvlianodorneles/applet.js @@ -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); +} \ No newline at end of file diff --git a/1440@jvlianodorneles/files/1440@jvlianodorneles/icon.png b/1440@jvlianodorneles/files/1440@jvlianodorneles/icon.png new file mode 100644 index 00000000000..3caa1845afb Binary files /dev/null and b/1440@jvlianodorneles/files/1440@jvlianodorneles/icon.png differ diff --git a/1440@jvlianodorneles/files/1440@jvlianodorneles/metadata.json b/1440@jvlianodorneles/files/1440@jvlianodorneles/metadata.json new file mode 100644 index 00000000000..f34938487a3 --- /dev/null +++ b/1440@jvlianodorneles/files/1440@jvlianodorneles/metadata.json @@ -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 +} diff --git a/1440@jvlianodorneles/files/1440@jvlianodorneles/po/1440@jvlianodorneles.pot b/1440@jvlianodorneles/files/1440@jvlianodorneles/po/1440@jvlianodorneles.pot new file mode 100644 index 00000000000..ab1bce544d9 --- /dev/null +++ b/1440@jvlianodorneles/files/1440@jvlianodorneles/po/1440@jvlianodorneles.pot @@ -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 , 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 \n" +"Language-Team: LANGUAGE \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 "" diff --git a/1440@jvlianodorneles/files/1440@jvlianodorneles/po/en.po b/1440@jvlianodorneles/files/1440@jvlianodorneles/po/en.po new file mode 100644 index 00000000000..85fab3dd885 --- /dev/null +++ b/1440@jvlianodorneles/files/1440@jvlianodorneles/po/en.po @@ -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." diff --git a/1440@jvlianodorneles/files/1440@jvlianodorneles/po/es.po b/1440@jvlianodorneles/files/1440@jvlianodorneles/po/es.po new file mode 100644 index 00000000000..90e7b91bc6b --- /dev/null +++ b/1440@jvlianodorneles/files/1440@jvlianodorneles/po/es.po @@ -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." diff --git a/1440@jvlianodorneles/files/1440@jvlianodorneles/po/hi.po b/1440@jvlianodorneles/files/1440@jvlianodorneles/po/hi.po new file mode 100644 index 00000000000..122332d8143 --- /dev/null +++ b/1440@jvlianodorneles/files/1440@jvlianodorneles/po/hi.po @@ -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 "दिन खत्म होने तक आपके पास कितने मिनट बचे हैं, इसका लगातार ट्रैक रखें, खासकर यदि आप उत्पादकता में सुधार के लिए प्रयासरत हैं - जैसे छात्र, सख्त समय सीमा वाले पेशेवर, या कोई भी जो अपनी दैनिक दिनचर्या को अधिक कुशलता से व्यवस्थित करने की कोशिश कर रहा है।" diff --git a/1440@jvlianodorneles/files/1440@jvlianodorneles/po/pt_BR.po b/1440@jvlianodorneles/files/1440@jvlianodorneles/po/pt_BR.po new file mode 100644 index 00000000000..7dad514da94 --- /dev/null +++ b/1440@jvlianodorneles/files/1440@jvlianodorneles/po/pt_BR.po @@ -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." diff --git a/1440@jvlianodorneles/files/1440@jvlianodorneles/po/pt_BR.po~ b/1440@jvlianodorneles/files/1440@jvlianodorneles/po/pt_BR.po~ new file mode 100644 index 00000000000..b834d0cc9d1 --- /dev/null +++ b/1440@jvlianodorneles/files/1440@jvlianodorneles/po/pt_BR.po~ @@ -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 \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." diff --git a/1440@jvlianodorneles/files/1440@jvlianodorneles/po/zh_CN.po b/1440@jvlianodorneles/files/1440@jvlianodorneles/po/zh_CN.po new file mode 100644 index 00000000000..4ab36da5307 --- /dev/null +++ b/1440@jvlianodorneles/files/1440@jvlianodorneles/po/zh_CN.po @@ -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 "持续跟踪一天中剩余的分钟数,特别是对于那些努力提高生产力的人——比如学生、有严格截止日期的专业人士,或者任何试图更有效地组织日常工作的人。" diff --git a/1440@jvlianodorneles/info.json b/1440@jvlianodorneles/info.json new file mode 100644 index 00000000000..0faa9401416 --- /dev/null +++ b/1440@jvlianodorneles/info.json @@ -0,0 +1,4 @@ +{ + "author": "jvlianodorneles", + "license": "GPLv3" +} diff --git a/1440@jvlianodorneles/screenshot.png b/1440@jvlianodorneles/screenshot.png new file mode 100644 index 00000000000..03933bc6889 Binary files /dev/null and b/1440@jvlianodorneles/screenshot.png differ