From 70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69 Mon Sep 17 00:00:00 2001 From: AlexanderCurl Date: Sat, 18 Apr 2026 17:46:06 +0100 Subject: Replaced file structures for themes in the correct format --- .../installed/reboottouefi@ubaygd.com/extension.js | 159 +++++++++++++++++++++ .../de/LC_MESSAGES/reboottouefi@ubaygd.com.mo | Bin 0 -> 514 bytes .../es/LC_MESSAGES/reboottouefi@ubaygd.com.mo | Bin 0 -> 705 bytes .../fa/LC_MESSAGES/reboottouefi@ubaygd.com.mo | Bin 0 -> 728 bytes .../fr/LC_MESSAGES/reboottouefi@ubaygd.com.mo | Bin 0 -> 709 bytes .../hu/LC_MESSAGES/reboottouefi@ubaygd.com.mo | Bin 0 -> 695 bytes .../it/LC_MESSAGES/reboottouefi@ubaygd.com.mo | Bin 0 -> 591 bytes .../nl/LC_MESSAGES/reboottouefi@ubaygd.com.mo | Bin 0 -> 664 bytes .../pl/LC_MESSAGES/reboottouefi@ubaygd.com.mo | Bin 0 -> 640 bytes .../pt_BR/LC_MESSAGES/reboottouefi@ubaygd.com.mo | Bin 0 -> 688 bytes .../ru/LC_MESSAGES/reboottouefi@ubaygd.com.mo | Bin 0 -> 778 bytes .../tr/LC_MESSAGES/reboottouefi@ubaygd.com.mo | Bin 0 -> 724 bytes .../zh_TW/LC_MESSAGES/reboottouefi@ubaygd.com.mo | Bin 0 -> 605 bytes .../reboottouefi@ubaygd.com/metadata.json | 18 +++ 14 files changed, 177 insertions(+) create mode 100644 raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/extension.js create mode 100644 raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/de/LC_MESSAGES/reboottouefi@ubaygd.com.mo create mode 100644 raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/es/LC_MESSAGES/reboottouefi@ubaygd.com.mo create mode 100644 raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/fa/LC_MESSAGES/reboottouefi@ubaygd.com.mo create mode 100644 raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/fr/LC_MESSAGES/reboottouefi@ubaygd.com.mo create mode 100644 raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/hu/LC_MESSAGES/reboottouefi@ubaygd.com.mo create mode 100644 raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/it/LC_MESSAGES/reboottouefi@ubaygd.com.mo create mode 100644 raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/nl/LC_MESSAGES/reboottouefi@ubaygd.com.mo create mode 100644 raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/pl/LC_MESSAGES/reboottouefi@ubaygd.com.mo create mode 100644 raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/pt_BR/LC_MESSAGES/reboottouefi@ubaygd.com.mo create mode 100644 raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/ru/LC_MESSAGES/reboottouefi@ubaygd.com.mo create mode 100644 raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/tr/LC_MESSAGES/reboottouefi@ubaygd.com.mo create mode 100644 raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/zh_TW/LC_MESSAGES/reboottouefi@ubaygd.com.mo create mode 100644 raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/metadata.json (limited to 'raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com') diff --git a/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/extension.js b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/extension.js new file mode 100644 index 0000000..ecaa1f5 --- /dev/null +++ b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/extension.js @@ -0,0 +1,159 @@ +/* extension.js + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ +/* exported init */ +import GLib from 'gi://GLib'; +import Gio from 'gi://Gio'; +import Clutter from 'gi://Clutter'; +import St from 'gi://St'; +import Pango from 'gi://Pango'; +import { panel } from 'resource:///org/gnome/shell/ui/main.js'; +import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; +import * as ModalDialog from 'resource:///org/gnome/shell/ui/modalDialog.js'; +import { Extension, gettext as _, } from 'resource:///org/gnome/shell/extensions/extension.js'; +const ManagerInterface = ` + + + + + + + + +`; +const Manager = Gio.DBusProxy.makeProxyWrapper(ManagerInterface); +export default class RebootToUefiExtension extends Extension { + menu; + proxy; + rebootToUefiItem; + counter; + seconds; + counterIntervalId; + messageIntervalId; + sourceId; + constructor(metadata) { + super(metadata); + } + modifySystemItem() { + this.menu = + panel.statusArea.quickSettings._system?.quickSettingsItems[0].menu; + this.proxy = Manager(Gio.DBus.system, 'org.freedesktop.login1', '/org/freedesktop/login1'); + this.rebootToUefiItem = new PopupMenu.PopupMenuItem(`${_('Restart to UEFI')}...`); + this.rebootToUefiItem.connect('activate', () => { + this.counter = 60; + this.seconds = this.counter; + const dialog = this.buildDialog(); + dialog.open(); + this.counterIntervalId = setInterval(() => { + if (this.counter > 0) { + this.counter--; + if (this.counter % 10 === 0) { + this.seconds = this.counter; + } + } + else { + this.clearIntervals(); + this.reboot(); + } + }, 1000); + }); + this.menu.addMenuItem(this.rebootToUefiItem, 2); + } + queueModifySystemItem() { + this.sourceId = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => { + if (!panel.statusArea.quickSettings._system) + return GLib.SOURCE_CONTINUE; + this.modifySystemItem(); + return GLib.SOURCE_REMOVE; + }); + } + enable() { + if (!panel.statusArea.quickSettings._system) { + this.queueModifySystemItem(); + } + else { + this.modifySystemItem(); + } + } + disable() { + this.clearIntervals(); + this.rebootToUefiItem?.destroy(); + this.rebootToUefiItem = null; + this.proxy = null; + if (this.sourceId) { + GLib.Source.remove(this.sourceId); + this.sourceId = null; + } + } + reboot() { + this.proxy?.SetRebootToFirmwareSetupRemote(true); + this.proxy?.RebootRemote(false); + } + buildDialog() { + const dialog = new ModalDialog.ModalDialog({ styleClass: 'modal-dialog' }); + dialog.setButtons([ + { + label: _('Cancel'), + action: () => { + this.clearIntervals(); + dialog.close(); + }, + key: Clutter.KEY_Escape, + default: false, + }, + { + label: _('Restart'), + action: () => { + this.clearIntervals(); + this.reboot(); + }, + default: false, + }, + ]); + const dialogTitle = new St.Label({ + text: _('Restart to UEFI'), + // style_class: 'dialog-title' // TODO investigate why css classes are not working + style: 'font-weight: bold;font-size:18px', + }); + let dialogMessage = new St.Label({ + text: this.getDialogMessageText(), + }); + dialogMessage.clutterText.ellipsize = Pango.EllipsizeMode.NONE; + dialogMessage.clutterText.lineWrap = true; + const titleBox = new St.BoxLayout({ + xAlign: Clutter.ActorAlign.CENTER, + }); + titleBox.add_child(new St.Label({ text: ' ' })); + titleBox.add_child(dialogTitle); + let box = new St.BoxLayout({ yExpand: true, vertical: true }); + box.add_child(titleBox); + box.add_child(new St.Label({ text: ' ' })); + box.add_child(dialogMessage); + this.messageIntervalId = setInterval(() => { + dialogMessage?.set_text(this.getDialogMessageText()); + }, 500); + dialog.contentLayout.add_child(box); + return dialog; + } + getDialogMessageText() { + return _(`The system will restart automatically in %d seconds.`).replace('%d', String(this.seconds)); + } + clearIntervals() { + clearInterval(this.counterIntervalId); + clearInterval(this.messageIntervalId); + } +} diff --git a/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/de/LC_MESSAGES/reboottouefi@ubaygd.com.mo b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/de/LC_MESSAGES/reboottouefi@ubaygd.com.mo new file mode 100644 index 0000000..bf69be6 Binary files /dev/null and b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/de/LC_MESSAGES/reboottouefi@ubaygd.com.mo differ diff --git a/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/es/LC_MESSAGES/reboottouefi@ubaygd.com.mo b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/es/LC_MESSAGES/reboottouefi@ubaygd.com.mo new file mode 100644 index 0000000..0bf7143 Binary files /dev/null and b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/es/LC_MESSAGES/reboottouefi@ubaygd.com.mo differ diff --git a/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/fa/LC_MESSAGES/reboottouefi@ubaygd.com.mo b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/fa/LC_MESSAGES/reboottouefi@ubaygd.com.mo new file mode 100644 index 0000000..a57b55f Binary files /dev/null and b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/fa/LC_MESSAGES/reboottouefi@ubaygd.com.mo differ diff --git a/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/fr/LC_MESSAGES/reboottouefi@ubaygd.com.mo b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/fr/LC_MESSAGES/reboottouefi@ubaygd.com.mo new file mode 100644 index 0000000..2c0190e Binary files /dev/null and b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/fr/LC_MESSAGES/reboottouefi@ubaygd.com.mo differ diff --git a/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/hu/LC_MESSAGES/reboottouefi@ubaygd.com.mo b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/hu/LC_MESSAGES/reboottouefi@ubaygd.com.mo new file mode 100644 index 0000000..148ced1 Binary files /dev/null and b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/hu/LC_MESSAGES/reboottouefi@ubaygd.com.mo differ diff --git a/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/it/LC_MESSAGES/reboottouefi@ubaygd.com.mo b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/it/LC_MESSAGES/reboottouefi@ubaygd.com.mo new file mode 100644 index 0000000..9a11583 Binary files /dev/null and b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/it/LC_MESSAGES/reboottouefi@ubaygd.com.mo differ diff --git a/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/nl/LC_MESSAGES/reboottouefi@ubaygd.com.mo b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/nl/LC_MESSAGES/reboottouefi@ubaygd.com.mo new file mode 100644 index 0000000..93ae66b Binary files /dev/null and b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/nl/LC_MESSAGES/reboottouefi@ubaygd.com.mo differ diff --git a/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/pl/LC_MESSAGES/reboottouefi@ubaygd.com.mo b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/pl/LC_MESSAGES/reboottouefi@ubaygd.com.mo new file mode 100644 index 0000000..88d48b0 Binary files /dev/null and b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/pl/LC_MESSAGES/reboottouefi@ubaygd.com.mo differ diff --git a/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/pt_BR/LC_MESSAGES/reboottouefi@ubaygd.com.mo b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/pt_BR/LC_MESSAGES/reboottouefi@ubaygd.com.mo new file mode 100644 index 0000000..6526459 Binary files /dev/null and b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/pt_BR/LC_MESSAGES/reboottouefi@ubaygd.com.mo differ diff --git a/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/ru/LC_MESSAGES/reboottouefi@ubaygd.com.mo b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/ru/LC_MESSAGES/reboottouefi@ubaygd.com.mo new file mode 100644 index 0000000..7228b00 Binary files /dev/null and b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/ru/LC_MESSAGES/reboottouefi@ubaygd.com.mo differ diff --git a/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/tr/LC_MESSAGES/reboottouefi@ubaygd.com.mo b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/tr/LC_MESSAGES/reboottouefi@ubaygd.com.mo new file mode 100644 index 0000000..d991f86 Binary files /dev/null and b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/tr/LC_MESSAGES/reboottouefi@ubaygd.com.mo differ diff --git a/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/zh_TW/LC_MESSAGES/reboottouefi@ubaygd.com.mo b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/zh_TW/LC_MESSAGES/reboottouefi@ubaygd.com.mo new file mode 100644 index 0000000..6be1f6a Binary files /dev/null and b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/locale/zh_TW/LC_MESSAGES/reboottouefi@ubaygd.com.mo differ diff --git a/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/metadata.json b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/metadata.json new file mode 100644 index 0000000..329b993 --- /dev/null +++ b/raveos-gnome-theme/theme-data/extensions/installed/reboottouefi@ubaygd.com/metadata.json @@ -0,0 +1,18 @@ +{ + "_generated": "Generated by SweetTooth, do not edit", + "description": "Reboot system into UEFI", + "gettext-domain": "reboottouefi@ubaygd.com", + "license": "GPLv3", + "name": "RebootToUEFI", + "shell-version": [ + "45", + "46", + "47", + "48", + "49", + "50" + ], + "url": "https://github.com/UbayGD/reboottouefi", + "uuid": "reboottouefi@ubaygd.com", + "version": 26 +} \ No newline at end of file -- cgit v1.3