diff --git a/auto-dark-light@gihaume/CHANGELOG.md b/auto-dark-light@gihaume/CHANGELOG.md index cd1e7532ca2..ae56a8179b4 100644 --- a/auto-dark-light@gihaume/CHANGELOG.md +++ b/auto-dark-light@gihaume/CHANGELOG.md @@ -1,6 +1,8 @@ -# Change log +## 1.2.0 - 22.10.2024 -## 1.1.0 - 2.09.2024 +- Added commands launching feature + +## 1.1.0 - 02.09.2024 - Added desktop background support diff --git a/auto-dark-light@gihaume/README.md b/auto-dark-light@gihaume/README.md index dc90a10f0d5..9da25331202 100644 --- a/auto-dark-light@gihaume/README.md +++ b/auto-dark-light@gihaume/README.md @@ -5,43 +5,42 @@ This Cinnamon applet brings the ability to automatically switch between dark and ## Features - Dump system themes and desktop background settings in one click to take advantage of the Cinnamon settings menu. -- Sync location from the system `Region` and `City` settings using a local database to determine the geographical coordinates. +- Sync location from the system `Region` and `City` settings using a local database to automatically determine the geographical coordinates. - Enter manually any geographical coordinates if needed. -- Always sync instantaneously with external changes of color scheme change, region/city, time (in e.g. from a sleep wakeup). -- Fully event based, zero polling. +- Always sync instantaneously with external changes of color scheme, region/city and time (useful in e.g. after a sleep wake up). +- Fully event and scheduling based, zero polling. - Automatic mode switch can be disabled. -- Dark/light mode can be switched manually. +- Dark/light mode can always be switched manually. +- Schedule any amount of commands to launch at twilight times. ## Applet icons legend -
- Auto +
+ Auto Automatic mode switch enabled.
-
-
- Auto inverted +
+ Auto inverted Automatic mode switch enabled but the current mode has been set while not in sync with the actual daytime, so any external changes won't update it until the next scheduled mode change or if entering auto mode switch again.
-
-
- Light +
+ Light Automatic mode switch disabled and the current mode is light.
-
-
- Dark +
+ Dark Automatic mode switch disabled and the current mode is dark.
## Dependencies -`make` and `gcc`, which can be installed on Debian-based system with `sudo apt install build-essentials`. +`make` and `gcc`, which can be installed on Debian-based system with `sudo apt install build-essential`. ## Feedback -- Add a *Like* if you like it. -- Report issues on the [GitHub repository](https://github.com/linuxmint/cinnamon-spices-applets/issues) in mentionning `@guillaume-mueller` to notify me. +Add a `⭐ Score` on the [CINNAMON spices](https://cinnamon-spices.linuxmint.com/applets/view/397) page if you like this applet. + +Report issues on the [GitHub repository](https://github.com/linuxmint/cinnamon-spices-applets/issues) in mentionning `@guillaume-mueller` to notify me. ## Donate diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/applet.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/applet.js index 6354c066c81..82a0d7d6303 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/applet.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/applet.js @@ -9,6 +9,7 @@ const Timezone_change_listener = require('./lib/timezone_change_listener.js' const Timezone_coordinates_finder = require('./lib/timezones_coordinates/timezone_coordinates_finder.js'); const Sleep_wakeup_listener = require('./lib/sleep_wakeup_listener.js'); const Color_scheme_change_listener = require('./lib/color_scheme_change_listener.js'); +const Commands_launcher = require('./lib/commands_launcher.js'); const { _ } = require('./lib/translator.js'); const Applet = imports.ui.applet; @@ -22,7 +23,11 @@ class ThisApplet extends Applet.IconApplet { super(orientation, panel_height, instance_id); this.metadata = metadata; - this.settings = new Settings.AppletSettings(this, metadata.uuid, instance_id); + this.settings = new Settings.AppletSettings( + this, + metadata.uuid, + instance_id + ); this.set_applet_tooltip( _("Click: toggle dark/light mode") + "\n" @@ -101,6 +106,17 @@ class ThisApplet extends Applet.IconApplet { } ); + this.commands_light = new Commands_launcher( + this.settings, + 'light-mode_commands_list', + this._notify_error.bind(this) + ); + this.commands_dark = new Commands_launcher( + this.settings, + 'dark-mode_commands_list', + this._notify_error.bind(this) + ); + try { this.time_change_listener = new Time_change_listener( `${this.metadata.path}/lib/time_change_listener`, @@ -144,9 +160,9 @@ class ThisApplet extends Applet.IconApplet { "is_auto_mode_inverted" ); this.settings.bind( - 'settings_control_switch_auto-mode', - "ui_switch_auto_mode", - () => { this.apply_ui_switch_auto_mode(); this._update(); } + 'settings_control_switch_auto-mode', + "ui_switch_auto_mode", + () => { this.apply_ui_switch_auto_mode(); this._update(); } ); this.settings.bind( 'settings_location_switch_sync-from-timezone', @@ -165,8 +181,16 @@ class ThisApplet extends Applet.IconApplet { ); this.settings.bind( 'both-modes_background_switch_enable', - "ui_switch_enable_background" - ) + "ui_switch_enable_background" + ); + this.settings.bind( + 'light-mode_commands_switch_enable', + "ui_switch_enable_commands_light" + ); + this.settings.bind( + 'dark-mode_commands_switch_enable', + "ui_switch_enable_commands_dark" + ); } apply_ui_switch_dark_mode() { @@ -179,6 +203,13 @@ class ThisApplet extends Applet.IconApplet { this.ui_switch_dark_mode ? this.background_dark.apply() : this.background_light.apply(); + if (this.ui_switch_dark_mode) { + if (this.ui_switch_enable_commands_dark) + this.commands_dark.launch_commands(); + } else { + if (this.ui_switch_enable_commands_light) + this.commands_light.launch_commands(); + } this._update_applet_icon(); } @@ -332,9 +363,9 @@ class ThisApplet extends Applet.IconApplet { if (!this._update_twilights()) return; this._notify( - _("Today's automatic mode switch times:") + '\n' - + `- ${_("Light mode:")} ${this.sunrise.as_string()}` + '\n' - + `- ${_("Dark mode:") } ${this.sunset .as_string()}` + _("Today's automatic mode switch times") + _(":") + '\n' + + `- ${_("Light mode")}${_(":")} ${this.sunrise.as_string()}` + '\n' + + `- ${_("Dark mode") }${_(":")} ${this.sunset .as_string()}` ); } @@ -370,16 +401,20 @@ class ThisApplet extends Applet.IconApplet { on_button_apply_background_dark() { this.background_dark.apply(); } + on_button_launch_commands_light() { this.commands_light.launch_commands(); } + + on_button_launch_commands_dark() { this.commands_dark.launch_commands(); } + _notify(msg) { Main.notify(this.metadata.name, msg); } _notify_error(msg) { - Main.notifyError(this.metadata.name, _("Error:") + " " + msg); + Main.notifyError(this.metadata.name, `${_("Error")}${_(":")} ${msg}`); } _notify_critical(msg) { Main.criticalNotify( this.metadata.name, - _("Critical error:") + " " + msg + `${_("Critical error")}${_(":")} ${msg}` ); } diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/CLASSES HIERARCHY.drawio.svg b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/CLASSES HIERARCHY.drawio.svg new file mode 100644 index 00000000000..4d4eb92ab2d --- /dev/null +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/CLASSES HIERARCHY.drawio.svg @@ -0,0 +1,4 @@ + + + +
light, dark
Background_handler
Color_scheme_change_listener
Event_scheduler
Screen_lock_handler
Sleep_wakeup_listener
SunCalc
light, dark
Themes_handler
Time_of_day
Timer_absolute
Timezone_change_listener
Twilights_calculator
ThisApplet
IconApplet
Time_change_listener
Timezone_coordinates_finder
Dbus
Commands_launcher
light, dark
\ No newline at end of file diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/commands_launcher.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/commands_launcher.js new file mode 100644 index 00000000000..c06d901f58f --- /dev/null +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/commands_launcher.js @@ -0,0 +1,47 @@ +const launch_command = require('./lib/launch_command.js'); +const { _ } = require('./lib/translator.js'); + +const {Gio, GLib} = imports.gi; + +class Commands_launcher { + #callback_for_errors; + + /** + * @param {Settings.XletSettingsBase} settings - The settings of the desk/applet. + * @param {object} key_of_list - The keys of the settings' commands list. + * @param {function(string): void} callback_for_errors - The callback with a message for when an error occurs. + */ + constructor(settings, key_of_list, callback_for_errors) { + settings.bindWithObject(this, key_of_list, "list"); + this.#callback_for_errors = callback_for_errors; + } + + async launch_commands() { + for (const item of this.list) { + const { name, active, expiry, command } = item; + + if (!active) + continue; + + try { await launch_command(command, expiry); } + catch (error) { + let msg = `${_("the command")} '${name}' ${_("failed")}`; + if (error instanceof GLib.ShellError) + msg += ` ${_("due to a wrong format")}${_(":")} ${error.message}`; + else + if (error instanceof Gio.IOErrorEnum) { + if (error.code === Gio.IOErrorEnum.TIMED_OUT) + msg += ` ${_("due to time expiration")}`; + else + if (error.code === Gio.IOErrorEnum.FAILED) + msg += ` ${_("with the following errors")}${_(":")} ${error.message}` + } else + msg += `${_(":")} ${error}` // full `error` object so we may see the stack trace + + this.#callback_for_errors(msg); + } + } + } +} + +module.exports = Commands_launcher; diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/launch_command.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/launch_command.js new file mode 100644 index 00000000000..caf4dac0952 --- /dev/null +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/launch_command.js @@ -0,0 +1,90 @@ +const {Gio, GLib} = imports.gi; + +Gio._promisify(Gio.Subprocess.prototype, 'communicate_utf8_async'); + +/** + * Executes a command with a timeout and transmits any error on failure. + * + * @async + * @param {string} command - The shell command to execute. + * @param {number} [timeout_seconds=10] - The delay in seconds before cancelling the command. `0` means infinity/never. + * @returns {Promise} + * @throws {GLib.ShellError} - If the command format is invalid. + * @throws {Gio.IOErrorEnum.TIMED_OUT} - If the command is cancelled due to a timeout. + * @throws {Gio.IOErrorEnum.FAILED} - If the command fails with a non-zero exit code. The error message is the `stderr` output if any, otherwise the exit status. + */ +async function launch_command(command, timeout_seconds = 10) { + const [_ok, argvp] = GLib.shell_parse_argv(command); // can throw GLib.ShellError + + const proc = new Gio.Subprocess({ + argv: argvp, + flags: Gio.SubprocessFlags.STDERR_PIPE + }); + + const cancellable = Gio.Cancellable.new(); + const cancellable_signal_handler_id = cancellable.connect( + () => proc.force_exit() + ); + + proc.init(cancellable); + + let timeout_event_source_id; + if (timeout_seconds !== 0) + timeout_event_source_id = GLib.timeout_add_seconds( + GLib.PRIORITY_DEFAULT, + timeout_seconds, + () => { + cancellable.cancel(); + timeout_event_source_id = undefined; + } + ); + + try { + const [_stdout, stderr] = await proc.communicate_utf8_async(null, null); + + if (cancellable.is_cancelled()) + throw new Gio.IOErrorEnum({ + code: Gio.IOErrorEnum.TIMED_OUT, + message: "timed out" + }); + + const exit_status = proc.get_exit_status(); + if (exit_status !== 0) { + throw new Gio.IOErrorEnum({ + code: Gio.IOErrorEnum.FAILED, + message: stderr ? stderr.trim() : "exit status: " + exit_status + }); + } + } finally { + cancellable.disconnect(cancellable_signal_handler_id); + if (timeout_event_source_id) + GLib.source_remove(timeout_event_source_id); + } +} + +module.exports = launch_command; + +// // Example usage: +// +// async function main() { +// console.error("start"); +// try { +// await launch_command('./test', 5); +// } catch (error) { +// if (error instanceof GLib.ShellError) +// console.error("command format: " + error.message); +// else +// if (error instanceof Gio.IOErrorEnum) { +// if (error.code === Gio.IOErrorEnum.TIMED_OUT) +// console.error("command aborted due to time out"); +// else +// if (error.code === Gio.IOErrorEnum.FAILED) +// console.error("command failed: " + error.message); +// } else +// console.error(error); // full object so we can see the stack trace +// } +// } + +// main(); + +// new GLib.MainLoop(null, false).run(); diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/metadata.json b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/metadata.json index feca98f4b48..3ac50bdd0de 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/metadata.json +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/metadata.json @@ -2,6 +2,6 @@ "uuid": "auto-dark-light@gihaume", "name": "Automatic dark/light themes", "description": "Automatically switch between dark and light themes at twilight times.", - "version": "1.1.0", + "version": "1.2.0", "max-instances": "1" } diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/auto-dark-light@gihaume.pot b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/auto-dark-light@gihaume.pot index b9256cf8430..6682ea0d160 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/auto-dark-light@gihaume.pot +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/auto-dark-light@gihaume.pot @@ -5,10 +5,10 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: auto-dark-light@gihaume 1.1.0\n" +"Project-Id-Version: auto-dark-light@gihaume 1.2.0\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-09-01 19:02-0400\n" +"POT-Creation-Date: 2024-10-22 07:37+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -17,32 +17,60 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#. applet.js:28 +#. applet.js:33 msgid "Click: toggle dark/light mode" msgstr "" -#. applet.js:29 +#. applet.js:34 msgid "Middle-click: toggle automatic switch mode" msgstr "" -#. applet.js:335 -msgid "Today's automatic mode switch times:" +#. applet.js:366 +msgid "Today's automatic mode switch times" msgstr "" -#. applet.js:336 -msgid "Light mode:" +#. applet.js:366 applet.js:367 applet.js:368 applet.js:411 applet.js:417 +#. lib/commands_launcher.js:30 lib/commands_launcher.js:37 +#. lib/commands_launcher.js:39 +msgid ":" msgstr "" -#. applet.js:337 -msgid "Dark mode:" +#. settings-schema.json->light-mode->title +#. applet.js:367 +msgid "Light mode" msgstr "" -#. applet.js:376 -msgid "Error:" +#. settings-schema.json->dark-mode->title +#. applet.js:368 +msgid "Dark mode" msgstr "" -#. applet.js:382 -msgid "Critical error:" +#. applet.js:411 +msgid "Error" +msgstr "" + +#. applet.js:417 +msgid "Critical error" +msgstr "" + +#. lib/commands_launcher.js:28 +msgid "the command" +msgstr "" + +#. lib/commands_launcher.js:28 +msgid "failed" +msgstr "" + +#. lib/commands_launcher.js:30 +msgid "due to a wrong format" +msgstr "" + +#. lib/commands_launcher.js:34 +msgid "due to time expiration" +msgstr "" + +#. lib/commands_launcher.js:37 +msgid "with the following errors" msgstr "" #. lib/twilights_calculator.js:24 @@ -68,14 +96,6 @@ msgstr "" msgid "Settings" msgstr "" -#. settings-schema.json->light-mode->title -msgid "Light mode" -msgstr "" - -#. settings-schema.json->dark-mode->title -msgid "Dark mode" -msgstr "" - #. settings-schema.json->settings_state->title msgid "State" msgstr "" @@ -93,9 +113,9 @@ msgstr "" msgid "Themes" msgstr "" -#. settings-schema.json->light-mode_other->title -#. settings-schema.json->dark-mode_other->title -msgid "Other" +#. settings-schema.json->light-mode_others->title +#. settings-schema.json->dark-mode_others->title +msgid "Others" msgstr "" #. settings-schema.json->light-mode_background->title @@ -103,6 +123,11 @@ msgstr "" msgid "Desktop background" msgstr "" +#. settings-schema.json->light-mode_commands->title +#. settings-schema.json->dark-mode_commands->title +msgid "Custom commands" +msgstr "" + #. settings-schema.json->settings_control_switch_auto-mode->description msgid "Automatically switch modes" msgstr "" @@ -250,7 +275,16 @@ msgid "Set desktop background" msgstr "" #. settings-schema.json->both-modes_background_switch_enable->tooltip -msgid "Set desktop background for light and dark modes" +msgid "Enable setting the desktop backgrounds for light and dark modes" +msgstr "" + +#. settings-schema.json->light-mode_commands_switch_enable->description +#. settings-schema.json->dark-mode_commands_switch_enable->description +msgid "Launch custom commands" +msgstr "" + +#. settings-schema.json->light-mode_commands_switch_enable->tooltip +msgid "Enable setting commands to be launched when switching to light mode" msgstr "" #. settings-schema.json->light-mode_background_button_open-os- @@ -299,6 +333,50 @@ msgstr "" msgid "Apply the light mode background settings to the system manually" msgstr "" +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Name" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Active" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Expiry (s)" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Command" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->tooltip +#. settings-schema.json->dark-mode_commands_list->tooltip +msgid "" +"List of commands to be executed when switching to this mode\n" +"\n" +"Notes:\n" +"- the name's purpose is for error messages\n" +"- the expiry time kills the command's process\n" +"- an expiry of 0 seconds means never\n" +"- any child process won't be able to expire\n" +"- the path is in the ~ directory\n" +"- the error messages reports stderr when the return status is not 0 and will " +"appear in a notification" +msgstr "" + +#. settings-schema.json->light-mode_commands_button_launch->description +#. settings-schema.json->dark-mode_commands_button_launch->description +msgid "Launch commands" +msgstr "" + +#. settings-schema.json->light-mode_commands_button_launch->tooltip +msgid "Launch the commands set for the light mode" +msgstr "" + #. settings-schema.json->dark-mode_themes_button_detect->tooltip msgid "" "Detect the system's themes currently set and assign them to the dark mode" @@ -308,6 +386,10 @@ msgstr "" msgid "Apply the dark mode themes to the system manually" msgstr "" +#. settings-schema.json->dark-mode_commands_switch_enable->tooltip +msgid "Enable setting commands to be launched when switching to dark mode" +msgstr "" + #. settings-schema.json->dark-mode_background_button_detect->tooltip msgid "" "Detect the system's background settings currently set and assign them to the " @@ -317,3 +399,7 @@ msgstr "" #. settings-schema.json->dark-mode_background_button_apply->tooltip msgid "Apply the dark mode background settings to the system manually" msgstr "" + +#. settings-schema.json->dark-mode_commands_button_launch->tooltip +msgid "Launch the commands set for the dark mode" +msgstr "" diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/ca.po b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/ca.po index d4a7b6cae95..66727053b78 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/ca.po +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/ca.po @@ -9,8 +9,8 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-09-01 19:02-0400\n" -"PO-Revision-Date: 2024-09-02 05:28+0200\n" +"POT-Creation-Date: 2024-10-22 07:37+0200\n" +"PO-Revision-Date: 2024-10-22 07:41+0200\n" "Last-Translator: Odyssey \n" "Language-Team: \n" "Language: ca\n" @@ -19,33 +19,61 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.4.2\n" -#. applet.js:28 +#. applet.js:33 msgid "Click: toggle dark/light mode" msgstr "Clic: alterna el mode fosc/clar" -#. applet.js:29 +#. applet.js:34 msgid "Middle-click: toggle automatic switch mode" msgstr "Clic del mig: alterna el mode de canvi automàtic" -#. applet.js:335 -msgid "Today's automatic mode switch times:" -msgstr "Hores de canvi de mode automàtic d'avui:" +#. applet.js:366 +msgid "Today's automatic mode switch times" +msgstr "Hores de canvi de mode automàtic d'avui" -#. applet.js:336 -msgid "Light mode:" -msgstr "Mode clar:" +#. applet.js:366 applet.js:367 applet.js:368 applet.js:411 applet.js:417 +#. lib/commands_launcher.js:30 lib/commands_launcher.js:37 +#. lib/commands_launcher.js:39 +msgid ":" +msgstr ":" -#. applet.js:337 -msgid "Dark mode:" -msgstr "Mode fosc:" +#. settings-schema.json->light-mode->title +#. applet.js:367 +msgid "Light mode" +msgstr "Mode clar" + +#. settings-schema.json->dark-mode->title +#. applet.js:368 +msgid "Dark mode" +msgstr "Mode fosc" + +#. applet.js:411 +msgid "Error" +msgstr "Error" + +#. applet.js:417 +msgid "Critical error" +msgstr "Error crític" + +#. lib/commands_launcher.js:28 +msgid "the command" +msgstr "" + +#. lib/commands_launcher.js:28 +msgid "failed" +msgstr "" -#. applet.js:376 -msgid "Error:" -msgstr "Error:" +#. lib/commands_launcher.js:30 +msgid "due to a wrong format" +msgstr "" + +#. lib/commands_launcher.js:34 +msgid "due to time expiration" +msgstr "" -#. applet.js:382 -msgid "Critical error:" -msgstr "Error crític:" +#. lib/commands_launcher.js:37 +msgid "with the following errors" +msgstr "" #. lib/twilights_calculator.js:24 msgid "unable to calculate twilight times, check coordinates format or range" @@ -77,14 +105,6 @@ msgstr "" msgid "Settings" msgstr "Opcions" -#. settings-schema.json->light-mode->title -msgid "Light mode" -msgstr "Mode clar" - -#. settings-schema.json->dark-mode->title -msgid "Dark mode" -msgstr "Mode fosc" - #. settings-schema.json->settings_state->title msgid "State" msgstr "Estat" @@ -102,9 +122,10 @@ msgstr "Ubicació" msgid "Themes" msgstr "Temes" -#. settings-schema.json->light-mode_other->title -#. settings-schema.json->dark-mode_other->title -msgid "Other" +#. settings-schema.json->light-mode_others->title +#. settings-schema.json->dark-mode_others->title +#, fuzzy +msgid "Others" msgstr "Altres" #. settings-schema.json->light-mode_background->title @@ -112,6 +133,11 @@ msgstr "Altres" msgid "Desktop background" msgstr "Fons d'escriptori" +#. settings-schema.json->light-mode_commands->title +#. settings-schema.json->dark-mode_commands->title +msgid "Custom commands" +msgstr "" + #. settings-schema.json->settings_control_switch_auto-mode->description msgid "Automatically switch modes" msgstr "Canvia de mode automàticament" @@ -267,9 +293,19 @@ msgid "Set desktop background" msgstr "Establir fons d'escriptori" #. settings-schema.json->both-modes_background_switch_enable->tooltip -msgid "Set desktop background for light and dark modes" +#, fuzzy +msgid "Enable setting the desktop backgrounds for light and dark modes" msgstr "Estableix el fons d'escriptori per als modes clar i fosc" +#. settings-schema.json->light-mode_commands_switch_enable->description +#. settings-schema.json->dark-mode_commands_switch_enable->description +msgid "Launch custom commands" +msgstr "" + +#. settings-schema.json->light-mode_commands_switch_enable->tooltip +msgid "Enable setting commands to be launched when switching to light mode" +msgstr "" + #. settings-schema.json->light-mode_background_button_open-os- #. settings->tooltip #. settings-schema.json->dark-mode_background_button_open-os-settings->tooltip @@ -323,6 +359,50 @@ msgid "Apply the light mode background settings to the system manually" msgstr "" "Aplica la configuració dels fons d'escriptori clars al sistema manualment" +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Name" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Active" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Expiry (s)" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Command" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->tooltip +#. settings-schema.json->dark-mode_commands_list->tooltip +msgid "" +"List of commands to be executed when switching to this mode\n" +"\n" +"Notes:\n" +"- the name's purpose is for error messages\n" +"- the expiry time kills the command's process\n" +"- an expiry of 0 seconds means never\n" +"- any child process won't be able to expire\n" +"- the path is in the ~ directory\n" +"- the error messages reports stderr when the return status is not 0 and will " +"appear in a notification" +msgstr "" + +#. settings-schema.json->light-mode_commands_button_launch->description +#. settings-schema.json->dark-mode_commands_button_launch->description +msgid "Launch commands" +msgstr "" + +#. settings-schema.json->light-mode_commands_button_launch->tooltip +msgid "Launch the commands set for the light mode" +msgstr "" + #. settings-schema.json->dark-mode_themes_button_detect->tooltip msgid "" "Detect the system's themes currently set and assign them to the dark mode" @@ -332,6 +412,10 @@ msgstr "Detecta els temes actius del sistema i els assigna al mode fosc" msgid "Apply the dark mode themes to the system manually" msgstr "Aplica els temes foscos al sistema manualment" +#. settings-schema.json->dark-mode_commands_switch_enable->tooltip +msgid "Enable setting commands to be launched when switching to dark mode" +msgstr "" + #. settings-schema.json->dark-mode_background_button_detect->tooltip msgid "" "Detect the system's background settings currently set and assign them to the " @@ -344,3 +428,7 @@ msgstr "" msgid "Apply the dark mode background settings to the system manually" msgstr "" "Aplica la configuració dels fons d'escriptori foscos al sistema manualment" + +#. settings-schema.json->dark-mode_commands_button_launch->tooltip +msgid "Launch the commands set for the dark mode" +msgstr "" diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/es.po b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/es.po index 3ede6243860..52f1d6caa3c 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/es.po +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/es.po @@ -8,43 +8,71 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-09-01 19:02-0400\n" -"PO-Revision-Date: 2024-09-02 11:29-0400\n" +"POT-Creation-Date: 2024-10-22 07:37+0200\n" +"PO-Revision-Date: 2024-10-22 07:40+0200\n" "Last-Translator: \n" "Language-Team: \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.4.4\n" +"X-Generator: Poedit 3.4.2\n" -#. applet.js:28 +#. applet.js:33 msgid "Click: toggle dark/light mode" msgstr "Clic: alternar modo oscuro/claro" -#. applet.js:29 +#. applet.js:34 msgid "Middle-click: toggle automatic switch mode" msgstr "Botón central: cambiar el modo de conmutación automática" -#. applet.js:335 -msgid "Today's automatic mode switch times:" -msgstr "Tiempos de cambio de modo automático de hoy:" +#. applet.js:366 +msgid "Today's automatic mode switch times" +msgstr "Tiempos de cambio de modo automático de hoy" -#. applet.js:336 -msgid "Light mode:" -msgstr "Modo claro:" +#. applet.js:366 applet.js:367 applet.js:368 applet.js:411 applet.js:417 +#. lib/commands_launcher.js:30 lib/commands_launcher.js:37 +#. lib/commands_launcher.js:39 +msgid ":" +msgstr ":" -#. applet.js:337 -msgid "Dark mode:" -msgstr "Modo oscuro:" +#. settings-schema.json->light-mode->title +#. applet.js:367 +msgid "Light mode" +msgstr "Modo claro" + +#. settings-schema.json->dark-mode->title +#. applet.js:368 +msgid "Dark mode" +msgstr "Modo oscuro" -#. applet.js:376 -msgid "Error:" -msgstr "Error:" +#. applet.js:411 +msgid "Error" +msgstr "Error" -#. applet.js:382 -msgid "Critical error:" -msgstr "Error crítico:" +#. applet.js:417 +msgid "Critical error" +msgstr "Error crítico" + +#. lib/commands_launcher.js:28 +msgid "the command" +msgstr "" + +#. lib/commands_launcher.js:28 +msgid "failed" +msgstr "" + +#. lib/commands_launcher.js:30 +msgid "due to a wrong format" +msgstr "" + +#. lib/commands_launcher.js:34 +msgid "due to time expiration" +msgstr "" + +#. lib/commands_launcher.js:37 +msgid "with the following errors" +msgstr "" #. lib/twilights_calculator.js:24 msgid "unable to calculate twilight times, check coordinates format or range" @@ -76,14 +104,6 @@ msgstr "" msgid "Settings" msgstr "Configuraciones" -#. settings-schema.json->light-mode->title -msgid "Light mode" -msgstr "Modo claro" - -#. settings-schema.json->dark-mode->title -msgid "Dark mode" -msgstr "Modo oscuro" - #. settings-schema.json->settings_state->title msgid "State" msgstr "Estado" @@ -101,9 +121,10 @@ msgstr "Ubicación" msgid "Themes" msgstr "Temas" -#. settings-schema.json->light-mode_other->title -#. settings-schema.json->dark-mode_other->title -msgid "Other" +#. settings-schema.json->light-mode_others->title +#. settings-schema.json->dark-mode_others->title +#, fuzzy +msgid "Others" msgstr "Otros" #. settings-schema.json->light-mode_background->title @@ -111,6 +132,11 @@ msgstr "Otros" msgid "Desktop background" msgstr "Fondo de escritorio" +#. settings-schema.json->light-mode_commands->title +#. settings-schema.json->dark-mode_commands->title +msgid "Custom commands" +msgstr "" + #. settings-schema.json->settings_control_switch_auto-mode->description msgid "Automatically switch modes" msgstr "Cambio automático de modos" @@ -270,9 +296,19 @@ msgid "Set desktop background" msgstr "Establecer fondo de escritorio" #. settings-schema.json->both-modes_background_switch_enable->tooltip -msgid "Set desktop background for light and dark modes" +#, fuzzy +msgid "Enable setting the desktop backgrounds for light and dark modes" msgstr "Establecer el fondo de escritorio para los modos claro y oscuro" +#. settings-schema.json->light-mode_commands_switch_enable->description +#. settings-schema.json->dark-mode_commands_switch_enable->description +msgid "Launch custom commands" +msgstr "" + +#. settings-schema.json->light-mode_commands_switch_enable->tooltip +msgid "Enable setting commands to be launched when switching to light mode" +msgstr "" + #. settings-schema.json->light-mode_background_button_open-os- #. settings->tooltip #. settings-schema.json->dark-mode_background_button_open-os-settings->tooltip @@ -326,6 +362,50 @@ msgstr "" msgid "Apply the light mode background settings to the system manually" msgstr "Aplicar manualmente los ajustes de fondo del modo claro al sistema" +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Name" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Active" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Expiry (s)" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Command" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->tooltip +#. settings-schema.json->dark-mode_commands_list->tooltip +msgid "" +"List of commands to be executed when switching to this mode\n" +"\n" +"Notes:\n" +"- the name's purpose is for error messages\n" +"- the expiry time kills the command's process\n" +"- an expiry of 0 seconds means never\n" +"- any child process won't be able to expire\n" +"- the path is in the ~ directory\n" +"- the error messages reports stderr when the return status is not 0 and will " +"appear in a notification" +msgstr "" + +#. settings-schema.json->light-mode_commands_button_launch->description +#. settings-schema.json->dark-mode_commands_button_launch->description +msgid "Launch commands" +msgstr "" + +#. settings-schema.json->light-mode_commands_button_launch->tooltip +msgid "Launch the commands set for the light mode" +msgstr "" + #. settings-schema.json->dark-mode_themes_button_detect->tooltip msgid "" "Detect the system's themes currently set and assign them to the dark mode" @@ -337,6 +417,10 @@ msgstr "" msgid "Apply the dark mode themes to the system manually" msgstr "Aplicar manualmente los temas del modo oscuro al sistema" +#. settings-schema.json->dark-mode_commands_switch_enable->tooltip +msgid "Enable setting commands to be launched when switching to dark mode" +msgstr "" + #. settings-schema.json->dark-mode_background_button_detect->tooltip msgid "" "Detect the system's background settings currently set and assign them to the " @@ -349,3 +433,7 @@ msgstr "" msgid "Apply the dark mode background settings to the system manually" msgstr "" "Aplicar manualmente la configuración de fondo del modo oscuro al sistema" + +#. settings-schema.json->dark-mode_commands_button_launch->tooltip +msgid "Launch the commands set for the dark mode" +msgstr "" diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/fr.po b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/fr.po index 294bdcd42e7..17f2056db65 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/fr.po +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/fr.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: auto-dark-light@gihaume 1.0.0\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-09-01 19:02-0400\n" -"PO-Revision-Date: 2024-09-02 00:04+0200\n" +"POT-Creation-Date: 2024-10-22 07:37+0200\n" +"PO-Revision-Date: 2024-10-22 07:48+0200\n" "Last-Translator: gihaume \n" "Language-Team: \n" "Language: fr\n" @@ -18,33 +18,61 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.4.2\n" -#. applet.js:28 +#. applet.js:33 msgid "Click: toggle dark/light mode" msgstr "Clique : basculer le mode sombre/clair" -#. applet.js:29 +#. applet.js:34 msgid "Middle-click: toggle automatic switch mode" msgstr "Clique du milieu : basculer la commutation de mode automatique" -#. applet.js:335 -msgid "Today's automatic mode switch times:" -msgstr "Heures des commutations de mode automatiques d'aujourd'hui :" +#. applet.js:366 +msgid "Today's automatic mode switch times" +msgstr "Heures des commutations de mode automatiques d'aujourd'hui" -#. applet.js:336 -msgid "Light mode:" -msgstr "Mode clair :" +#. applet.js:366 applet.js:367 applet.js:368 applet.js:411 applet.js:417 +#. lib/commands_launcher.js:30 lib/commands_launcher.js:37 +#. lib/commands_launcher.js:39 +msgid ":" +msgstr " :" -#. applet.js:337 -msgid "Dark mode:" -msgstr "Mode sombre :" +#. settings-schema.json->light-mode->title +#. applet.js:367 +msgid "Light mode" +msgstr "Mode clair" + +#. settings-schema.json->dark-mode->title +#. applet.js:368 +msgid "Dark mode" +msgstr "Mode sombre" + +#. applet.js:411 +msgid "Error" +msgstr "Erreur" + +#. applet.js:417 +msgid "Critical error" +msgstr "Erreur critique" -#. applet.js:376 -msgid "Error:" -msgstr "Erreur :" +#. lib/commands_launcher.js:28 +msgid "the command" +msgstr "la commande" -#. applet.js:382 -msgid "Critical error:" -msgstr "Erreur critique :" +#. lib/commands_launcher.js:28 +msgid "failed" +msgstr "a échoué" + +#. lib/commands_launcher.js:30 +msgid "due to a wrong format" +msgstr "en raison d'un mauvais formattage" + +#. lib/commands_launcher.js:34 +msgid "due to time expiration" +msgstr "en raison de l'expiration du délai" + +#. lib/commands_launcher.js:37 +msgid "with the following errors" +msgstr "avec les erreurs suivantes" #. lib/twilights_calculator.js:24 msgid "unable to calculate twilight times, check coordinates format or range" @@ -76,14 +104,6 @@ msgstr "" msgid "Settings" msgstr "Paramètres" -#. settings-schema.json->light-mode->title -msgid "Light mode" -msgstr "Mode clair" - -#. settings-schema.json->dark-mode->title -msgid "Dark mode" -msgstr "Mode sombre" - #. settings-schema.json->settings_state->title msgid "State" msgstr "État" @@ -101,16 +121,21 @@ msgstr "Emplacement" msgid "Themes" msgstr "Thèmes" -#. settings-schema.json->light-mode_other->title -#. settings-schema.json->dark-mode_other->title -msgid "Other" -msgstr "Autre" +#. settings-schema.json->light-mode_others->title +#. settings-schema.json->dark-mode_others->title +msgid "Others" +msgstr "Autres" #. settings-schema.json->light-mode_background->title #. settings-schema.json->dark-mode_background->title msgid "Desktop background" msgstr "Arrière-plan du bureau" +#. settings-schema.json->light-mode_commands->title +#. settings-schema.json->dark-mode_commands->title +msgid "Custom commands" +msgstr "Commandes personnalisées" + #. settings-schema.json->settings_control_switch_auto-mode->description msgid "Automatically switch modes" msgstr "Basculer automatiquement entre les modes" @@ -270,8 +295,18 @@ msgid "Set desktop background" msgstr "Définir l'arrière-plan du bureau" #. settings-schema.json->both-modes_background_switch_enable->tooltip -msgid "Set desktop background for light and dark modes" -msgstr "Définir l'arrière-plan du bureau pour les modes clair et sombre" +msgid "Enable setting the desktop backgrounds for light and dark modes" +msgstr "Définir les arrière-plans du bureau pour les modes clair et sombre" + +#. settings-schema.json->light-mode_commands_switch_enable->description +#. settings-schema.json->dark-mode_commands_switch_enable->description +msgid "Launch custom commands" +msgstr "Lancer des commandes personnalisées" + +#. settings-schema.json->light-mode_commands_switch_enable->tooltip +msgid "Enable setting commands to be launched when switching to light mode" +msgstr "" +"Permettre de choisir des commandes à lancer lors du passage au mode clair" #. settings-schema.json->light-mode_background_button_open-os- #. settings->tooltip @@ -326,6 +361,60 @@ msgid "Apply the light mode background settings to the system manually" msgstr "" "Appliquer manuellement les paramètres d'arrière-plan du mode clair au système" +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Name" +msgstr "Nom" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Active" +msgstr "Activée" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Expiry (s)" +msgstr "Expiration (s)" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Command" +msgstr "Commande" + +#. settings-schema.json->light-mode_commands_list->tooltip +#. settings-schema.json->dark-mode_commands_list->tooltip +msgid "" +"List of commands to be executed when switching to this mode\n" +"\n" +"Notes:\n" +"- the name's purpose is for error messages\n" +"- the expiry time kills the command's process\n" +"- an expiry of 0 seconds means never\n" +"- any child process won't be able to expire\n" +"- the path is in the ~ directory\n" +"- the error messages reports stderr when the return status is not 0 and will " +"appear in a notification" +msgstr "" +"Liste des commandes à exécuter lors du passage vers ce mode\n" +"\n" +"Notes :\n" +"- le nom est utilisé pour les messages d'erreur\n" +"- le délai d'expiration tue le processus de la commande\n" +"- un délai d'expiration de 0 seconde signifie jamais\n" +"- le délai ne fait pas expirer les processus enfants\n" +"- le chemin d'accès est dans le répertoire ~\n" +"- les messages d'erreur rapportent stderr lorsque l'état de retour n'est pas " +"0 et apparaîtront dans une notification" + +#. settings-schema.json->light-mode_commands_button_launch->description +#. settings-schema.json->dark-mode_commands_button_launch->description +msgid "Launch commands" +msgstr "Lancer des commandes" + +#. settings-schema.json->light-mode_commands_button_launch->tooltip +msgid "Launch the commands set for the light mode" +msgstr "Lance les commandes choisies pour le mode clair" + #. settings-schema.json->dark-mode_themes_button_detect->tooltip msgid "" "Detect the system's themes currently set and assign them to the dark mode" @@ -337,6 +426,11 @@ msgstr "" msgid "Apply the dark mode themes to the system manually" msgstr "Appliquer manuellement les thèmes du mode sombre au système" +#. settings-schema.json->dark-mode_commands_switch_enable->tooltip +msgid "Enable setting commands to be launched when switching to dark mode" +msgstr "" +"Permettre de choisir des commandes à lancer lors du passage au mode sombre" + #. settings-schema.json->dark-mode_background_button_detect->tooltip msgid "" "Detect the system's background settings currently set and assign them to the " @@ -350,3 +444,7 @@ msgid "Apply the dark mode background settings to the system manually" msgstr "" "Appliquer manuellement les paramètres d'arrière-plan du mode sombre au " "système" + +#. settings-schema.json->dark-mode_commands_button_launch->tooltip +msgid "Launch the commands set for the dark mode" +msgstr "Lance les commandes choisies pour le mode sombre" diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/hu.po b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/hu.po index f804ab8ca15..ba795e936f9 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/hu.po +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/hu.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: auto-dark-light@gihaume 1.1.0\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-09-01 19:02-0400\n" +"POT-Creation-Date: 2024-10-22 07:37+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -18,33 +18,61 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.4.2\n" -#. applet.js:28 +#. applet.js:33 msgid "Click: toggle dark/light mode" msgstr "Kattintás: sötét/világos üzemmód váltása" -#. applet.js:29 +#. applet.js:34 msgid "Middle-click: toggle automatic switch mode" msgstr "Középső kattintás: automatikus kapcsolási mód váltása" -#. applet.js:335 -msgid "Today's automatic mode switch times:" -msgstr "A mai automatikus üzemmódváltás ideje:" +#. applet.js:366 +msgid "Today's automatic mode switch times" +msgstr "A mai automatikus üzemmódváltás ideje" -#. applet.js:336 -msgid "Light mode:" -msgstr "Világos mód:" +#. applet.js:366 applet.js:367 applet.js:368 applet.js:411 applet.js:417 +#. lib/commands_launcher.js:30 lib/commands_launcher.js:37 +#. lib/commands_launcher.js:39 +msgid ":" +msgstr ":" -#. applet.js:337 -msgid "Dark mode:" -msgstr "Sötét mód:" +#. settings-schema.json->light-mode->title +#. applet.js:367 +msgid "Light mode" +msgstr "Világos mód" + +#. settings-schema.json->dark-mode->title +#. applet.js:368 +msgid "Dark mode" +msgstr "Sötét mód" + +#. applet.js:411 +msgid "Error" +msgstr "Hiba" + +#. applet.js:417 +msgid "Critical error" +msgstr "Kritikus hiba" + +#. lib/commands_launcher.js:28 +msgid "the command" +msgstr "" + +#. lib/commands_launcher.js:28 +msgid "failed" +msgstr "" -#. applet.js:376 -msgid "Error:" -msgstr "Hiba:" +#. lib/commands_launcher.js:30 +msgid "due to a wrong format" +msgstr "" + +#. lib/commands_launcher.js:34 +msgid "due to time expiration" +msgstr "" -#. applet.js:382 -msgid "Critical error:" -msgstr "Kritikus hiba:" +#. lib/commands_launcher.js:37 +msgid "with the following errors" +msgstr "" #. lib/twilights_calculator.js:24 msgid "unable to calculate twilight times, check coordinates format or range" @@ -74,14 +102,6 @@ msgstr "Automatikus váltás a sötét és világos témák között szürkület msgid "Settings" msgstr "Beállítások" -#. settings-schema.json->light-mode->title -msgid "Light mode" -msgstr "Világos mód" - -#. settings-schema.json->dark-mode->title -msgid "Dark mode" -msgstr "Sötét mód" - #. settings-schema.json->settings_state->title msgid "State" msgstr "Állapot" @@ -99,9 +119,10 @@ msgstr "Hely" msgid "Themes" msgstr "Témák" -#. settings-schema.json->light-mode_other->title -#. settings-schema.json->dark-mode_other->title -msgid "Other" +#. settings-schema.json->light-mode_others->title +#. settings-schema.json->dark-mode_others->title +#, fuzzy +msgid "Others" msgstr "Más" #. settings-schema.json->light-mode_background->title @@ -109,6 +130,11 @@ msgstr "Más" msgid "Desktop background" msgstr "Asztal háttere" +#. settings-schema.json->light-mode_commands->title +#. settings-schema.json->dark-mode_commands->title +msgid "Custom commands" +msgstr "" + #. settings-schema.json->settings_control_switch_auto-mode->description msgid "Automatically switch modes" msgstr "Automatikus üzemmódváltás" @@ -266,9 +292,19 @@ msgid "Set desktop background" msgstr "Asztali háttér beállítása" #. settings-schema.json->both-modes_background_switch_enable->tooltip -msgid "Set desktop background for light and dark modes" +#, fuzzy +msgid "Enable setting the desktop backgrounds for light and dark modes" msgstr "Asztali háttér beállítása világos és sötét üzemmódokhoz" +#. settings-schema.json->light-mode_commands_switch_enable->description +#. settings-schema.json->dark-mode_commands_switch_enable->description +msgid "Launch custom commands" +msgstr "" + +#. settings-schema.json->light-mode_commands_switch_enable->tooltip +msgid "Enable setting commands to be launched when switching to light mode" +msgstr "" + #. settings-schema.json->light-mode_background_button_open-os- #. settings->tooltip #. settings-schema.json->dark-mode_background_button_open-os-settings->tooltip @@ -318,6 +354,50 @@ msgstr "Az asztali háttér diavetítéshez beállítandó képeket tartalmazó msgid "Apply the light mode background settings to the system manually" msgstr "A fénymód háttérbeállításainak manuális alkalmazása a rendszerre" +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Name" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Active" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Expiry (s)" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Command" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->tooltip +#. settings-schema.json->dark-mode_commands_list->tooltip +msgid "" +"List of commands to be executed when switching to this mode\n" +"\n" +"Notes:\n" +"- the name's purpose is for error messages\n" +"- the expiry time kills the command's process\n" +"- an expiry of 0 seconds means never\n" +"- any child process won't be able to expire\n" +"- the path is in the ~ directory\n" +"- the error messages reports stderr when the return status is not 0 and will " +"appear in a notification" +msgstr "" + +#. settings-schema.json->light-mode_commands_button_launch->description +#. settings-schema.json->dark-mode_commands_button_launch->description +msgid "Launch commands" +msgstr "" + +#. settings-schema.json->light-mode_commands_button_launch->tooltip +msgid "Launch the commands set for the light mode" +msgstr "" + #. settings-schema.json->dark-mode_themes_button_detect->tooltip msgid "" "Detect the system's themes currently set and assign them to the dark mode" @@ -329,6 +409,10 @@ msgstr "" msgid "Apply the dark mode themes to the system manually" msgstr "Alkalmazza a sötét üzemmód témáit a rendszerre manuálisan" +#. settings-schema.json->dark-mode_commands_switch_enable->tooltip +msgid "Enable setting commands to be launched when switching to dark mode" +msgstr "" + #. settings-schema.json->dark-mode_background_button_detect->tooltip msgid "" "Detect the system's background settings currently set and assign them to the " @@ -340,3 +424,7 @@ msgstr "" #. settings-schema.json->dark-mode_background_button_apply->tooltip msgid "Apply the dark mode background settings to the system manually" msgstr "Alkalmazza a sötét mód háttérbeállításait a rendszerre manuálisan" + +#. settings-schema.json->dark-mode_commands_button_launch->tooltip +msgid "Launch the commands set for the dark mode" +msgstr "" diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/nl.po b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/nl.po index 9b9207d15ce..bab352dd287 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/nl.po +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/nl.po @@ -7,42 +7,71 @@ msgstr "" "Project-Id-Version: auto-dark-light@gihaume 1.1.0\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-09-01 19:02-0400\n" -"PO-Revision-Date: 2024-09-11 12:14+0200\n" +"POT-Creation-Date: 2024-10-22 07:37+0200\n" +"PO-Revision-Date: 2024-10-22 07:41+0200\n" "Last-Translator: qadzek\n" "Language-Team: \n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.4.2\n" -#. applet.js:28 +#. applet.js:33 msgid "Click: toggle dark/light mode" msgstr "Klik: schakelen tussen donkere/lichte modus" -#. applet.js:29 +#. applet.js:34 msgid "Middle-click: toggle automatic switch mode" msgstr "Middelklik: in- en uitschakelen van automatische omschakelingsmodus" -#. applet.js:335 -msgid "Today's automatic mode switch times:" -msgstr "Automatische omschakeltijden van vandaag:" +#. applet.js:366 +msgid "Today's automatic mode switch times" +msgstr "Automatische omschakeltijden van vandaag" -#. applet.js:336 -msgid "Light mode:" -msgstr "Lichte modus:" +#. applet.js:366 applet.js:367 applet.js:368 applet.js:411 applet.js:417 +#. lib/commands_launcher.js:30 lib/commands_launcher.js:37 +#. lib/commands_launcher.js:39 +msgid ":" +msgstr ":" -#. applet.js:337 -msgid "Dark mode:" -msgstr "Donkere modus:" +#. settings-schema.json->light-mode->title +#. applet.js:367 +msgid "Light mode" +msgstr "Lichte modus" + +#. settings-schema.json->dark-mode->title +#. applet.js:368 +msgid "Dark mode" +msgstr "Donkere modus" -#. applet.js:376 -msgid "Error:" -msgstr "Fout:" +#. applet.js:411 +msgid "Error" +msgstr "Fout" -#. applet.js:382 -msgid "Critical error:" -msgstr "Kritieke fout:" +#. applet.js:417 +msgid "Critical error" +msgstr "Kritieke fout" + +#. lib/commands_launcher.js:28 +msgid "the command" +msgstr "" + +#. lib/commands_launcher.js:28 +msgid "failed" +msgstr "" + +#. lib/commands_launcher.js:30 +msgid "due to a wrong format" +msgstr "" + +#. lib/commands_launcher.js:34 +msgid "due to time expiration" +msgstr "" + +#. lib/commands_launcher.js:37 +msgid "with the following errors" +msgstr "" #. lib/twilights_calculator.js:24 msgid "unable to calculate twilight times, check coordinates format or range" @@ -73,14 +102,6 @@ msgstr "" msgid "Settings" msgstr "Instellingen" -#. settings-schema.json->light-mode->title -msgid "Light mode" -msgstr "Lichte modus" - -#. settings-schema.json->dark-mode->title -msgid "Dark mode" -msgstr "Donkere modus" - #. settings-schema.json->settings_state->title msgid "State" msgstr "Staat" @@ -98,9 +119,10 @@ msgstr "Locatie" msgid "Themes" msgstr "Thema's" -#. settings-schema.json->light-mode_other->title -#. settings-schema.json->dark-mode_other->title -msgid "Other" +#. settings-schema.json->light-mode_others->title +#. settings-schema.json->dark-mode_others->title +#, fuzzy +msgid "Others" msgstr "Andere" #. settings-schema.json->light-mode_background->title @@ -108,6 +130,11 @@ msgstr "Andere" msgid "Desktop background" msgstr "Bureaubladachtergrond" +#. settings-schema.json->light-mode_commands->title +#. settings-schema.json->dark-mode_commands->title +msgid "Custom commands" +msgstr "" + #. settings-schema.json->settings_control_switch_auto-mode->description msgid "Automatically switch modes" msgstr "Automatisch schakelen tussen modi" @@ -266,9 +293,19 @@ msgid "Set desktop background" msgstr "Stel bureaubladachtergrond in" #. settings-schema.json->both-modes_background_switch_enable->tooltip -msgid "Set desktop background for light and dark modes" +#, fuzzy +msgid "Enable setting the desktop backgrounds for light and dark modes" msgstr "Stel de bureaubladachtergrond in voor lichte en donkere modi" +#. settings-schema.json->light-mode_commands_switch_enable->description +#. settings-schema.json->dark-mode_commands_switch_enable->description +msgid "Launch custom commands" +msgstr "" + +#. settings-schema.json->light-mode_commands_switch_enable->tooltip +msgid "Enable setting commands to be launched when switching to light mode" +msgstr "" + #. settings-schema.json->light-mode_background_button_open-os- #. settings->tooltip #. settings-schema.json->dark-mode_background_button_open-os-settings->tooltip @@ -323,6 +360,50 @@ msgstr "" "Pas de achtergrondinstellingen van de lichte modus handmatig toe op het " "systeem" +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Name" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Active" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Expiry (s)" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->columns->title +#. settings-schema.json->dark-mode_commands_list->columns->title +msgid "Command" +msgstr "" + +#. settings-schema.json->light-mode_commands_list->tooltip +#. settings-schema.json->dark-mode_commands_list->tooltip +msgid "" +"List of commands to be executed when switching to this mode\n" +"\n" +"Notes:\n" +"- the name's purpose is for error messages\n" +"- the expiry time kills the command's process\n" +"- an expiry of 0 seconds means never\n" +"- any child process won't be able to expire\n" +"- the path is in the ~ directory\n" +"- the error messages reports stderr when the return status is not 0 and will " +"appear in a notification" +msgstr "" + +#. settings-schema.json->light-mode_commands_button_launch->description +#. settings-schema.json->dark-mode_commands_button_launch->description +msgid "Launch commands" +msgstr "" + +#. settings-schema.json->light-mode_commands_button_launch->tooltip +msgid "Launch the commands set for the light mode" +msgstr "" + #. settings-schema.json->dark-mode_themes_button_detect->tooltip msgid "" "Detect the system's themes currently set and assign them to the dark mode" @@ -334,6 +415,10 @@ msgstr "" msgid "Apply the dark mode themes to the system manually" msgstr "Pas de donkere modus thema's handmatig toe op het systeem" +#. settings-schema.json->dark-mode_commands_switch_enable->tooltip +msgid "Enable setting commands to be launched when switching to dark mode" +msgstr "" + #. settings-schema.json->dark-mode_background_button_detect->tooltip msgid "" "Detect the system's background settings currently set and assign them to the " @@ -347,3 +432,7 @@ msgid "Apply the dark mode background settings to the system manually" msgstr "" "Pas de achtergrondinstellingen van de donkere modus handmatig toe op het " "systeem" + +#. settings-schema.json->dark-mode_commands_button_launch->tooltip +msgid "Launch the commands set for the dark mode" +msgstr "" diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/settings-schema.json b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/settings-schema.json index e426e95649b..7f11f9be6bb 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/settings-schema.json +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/settings-schema.json @@ -16,8 +16,9 @@ "title": "Light mode", "sections": [ "light-mode_themes", - "light-mode_other", - "light-mode_background" + "light-mode_others", + "light-mode_background", + "light-mode_commands" ] }, "dark-mode": { @@ -25,8 +26,9 @@ "title": "Dark mode", "sections": [ "dark-mode_themes", - "dark-mode_other", - "dark-mode_background" + "dark-mode_others", + "dark-mode_background", + "dark-mode_commands" ] }, @@ -65,10 +67,13 @@ "light-mode_themes_button_apply" ] }, - "light-mode_other": { + "light-mode_others": { "type": "section", - "title": "Other", - "keys": ["both-modes_background_switch_enable"] + "title": "Others", + "keys": [ + "both-modes_background_switch_enable", + "light-mode_commands_switch_enable" + ] }, "light-mode_background": { "dependency": "both-modes_background_switch_enable=true", @@ -83,6 +88,15 @@ "light-mode_background_button_apply" ] }, + "light-mode_commands": { + "dependency": "light-mode_commands_switch_enable=true", + "type": "section", + "title": "Custom commands", + "keys": [ + "light-mode_commands_list", + "light-mode_commands_button_launch" + ] + }, "dark-mode_themes": { "type": "section", "title": "Themes", @@ -96,10 +110,13 @@ "dark-mode_themes_button_apply" ] }, - "dark-mode_other": { + "dark-mode_others": { "type": "section", - "title": "Other", - "keys": ["both-modes_background_switch_enable"] + "title": "Others", + "keys": [ + "both-modes_background_switch_enable", + "dark-mode_commands_switch_enable" + ] }, "dark-mode_background": { "dependency": "both-modes_background_switch_enable=true", @@ -113,6 +130,15 @@ "dark-mode_background_filechooser_folder", "dark-mode_background_button_apply" ] + }, + "dark-mode_commands": { + "dependency": "dark-mode_commands_switch_enable=true", + "type": "section", + "title": "Custom commands", + "keys": [ + "dark-mode_commands_list", + "dark-mode_commands_button_launch" + ] } }, @@ -211,7 +237,13 @@ "type": "switch", "default": false, "description": "Set desktop background", - "tooltip": "Set desktop background for light and dark modes" + "tooltip": "Enable setting the desktop backgrounds for light and dark modes" + }, + "light-mode_commands_switch_enable": { + "type": "switch", + "default": false, + "description": "Launch custom commands", + "tooltip": "Enable setting commands to be launched when switching to light mode" }, "light-mode_background_button_open-os-settings": { "type": "button", @@ -252,6 +284,23 @@ "description": "Apply to the system", "tooltip": "Apply the light mode background settings to the system manually" }, + "light-mode_commands_list": { + "type" : "list", + "columns" : [ + {"id": "name", "title": "Name", "type": "string", "default": "unnamed"}, + {"id": "active", "title": "Active", "type": "boolean", "defaut": true}, + {"id": "expiry", "title": "Expiry (s)", "type": "integer", "align": 1, "default": 10, "min": 0, "max": 1000}, + {"id": "command", "title": "Command", "type": "string"} + ], + "default" : [], + "tooltip" : "List of commands to be executed when switching to this mode\n\nNotes:\n- the name's purpose is for error messages\n- the expiry time kills the command's process\n- an expiry of 0 seconds means never\n- any child process won't be able to expire\n- the path is in the ~ directory\n- the error messages reports stderr when the return status is not 0 and will appear in a notification" + }, + "light-mode_commands_button_launch": { + "type": "button", + "callback": "on_button_launch_commands_light", + "description": "Launch commands", + "tooltip": "Launch the commands set for the light mode" + }, "dark-mode_themes_button_open-os-settings": { "type": "button", "callback": "on_button_open_os_themes_settings", @@ -294,6 +343,12 @@ "description": "Apply to the system", "tooltip": "Apply the dark mode themes to the system manually" }, + "dark-mode_commands_switch_enable": { + "type": "switch", + "default": false, + "description": "Launch custom commands", + "tooltip": "Enable setting commands to be launched when switching to dark mode" + }, "dark-mode_background_button_open-os-settings": { "type": "button", "callback": "on_button_open_os_background_settings", @@ -333,6 +388,23 @@ "description": "Apply to the system", "tooltip": "Apply the dark mode background settings to the system manually" }, + "dark-mode_commands_list": { + "type" : "list", + "columns" : [ + {"id": "name", "title": "Name", "type": "string", "default": "unnamed"}, + {"id": "active", "title": "Active", "type": "boolean", "defaut": true}, + {"id": "expiry", "title": "Expiry (s)", "type": "integer", "align": 1, "default": 10, "min": 0, "max": 1000}, + {"id": "command", "title": "Command", "type": "string"} + ], + "default" : [], + "tooltip" : "List of commands to be executed when switching to this mode\n\nNotes:\n- the name's purpose is for error messages\n- the expiry time kills the command's process\n- an expiry of 0 seconds means never\n- any child process won't be able to expire\n- the path is in the ~ directory\n- the error messages reports stderr when the return status is not 0 and will appear in a notification" + }, + "dark-mode_commands_button_launch": { + "type": "button", + "callback": "on_button_launch_commands_dark", + "description": "Launch commands", + "tooltip": "Launch the commands set for the dark mode" + }, "has-detected-themes-light": { "type": "generic",