Skip to content

Commit 4cae7d9

Browse files
committed
v1.2.0 - Allows hibernation using root user rights
1 parent 65a9693 commit 4cae7d9

File tree

12 files changed

+166
-117
lines changed

12 files changed

+166
-117
lines changed

Exit@claudiux/files/Exit@claudiux/5.4/applet.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class ExitApplet extends Applet.IconApplet {
6969
this.s.bind("showRestartCinnamon", "showRestartCinnamon");
7070
this.s.bind("showSuspend", "showSuspend");
7171
this.s.bind("showHibernate", "showHibernate");
72+
this.s.bind("hibernateNeedsSudo", "hibernateNeedsSudo");
7273
this.s.bind("showRestart", "showRestart");
7374
this.s.bind("showPowerOff", "showPowerOff");
7475
this.s.bind("showLockscreen", "showLockscreen");
@@ -200,7 +201,10 @@ class ExitApplet extends Applet.IconApplet {
200201
item = new PopupMenu.PopupIconMenuItem(_("Hibernate"), "system-suspend-hibernate", St.IconType.SYMBOLIC);
201202
item.connect('activate', Lang.bind(this, function () {
202203
this.menu.close(true);
203-
launcher.spawnv(["systemctl", "hibernate"]);
204+
if (this.hibernateNeedsSudo)
205+
launcher.spawnv(["pkexec", "sudo", "systemctl", "hibernate"]);
206+
else
207+
launcher.spawnv(["systemctl", "hibernate"]);
204208
}));
205209
this.menu.addMenuItem(item);
206210
}

Exit@claudiux/files/Exit@claudiux/5.4/settings-schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
"default": true,
3131
"description": "Show the Hibernate option"
3232
},
33+
"hibernateNeedsSudo": {
34+
"type": "switch",
35+
"default": false,
36+
"dependency": "showHibernate",
37+
"description": "Hibernate needs root user rights (sudo)"
38+
},
3339
"showRestart": {
3440
"type": "switch",
3541
"default": true,

Exit@claudiux/files/Exit@claudiux/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### v1.2.0~20240929
2+
3+
* Allows hibernation using root user rights.
4+
15
### v1.1.2~20240623
26

37
* Improves translations.

Exit@claudiux/files/Exit@claudiux/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"description": "Restart Cinnamon, lock the screen, switch users, log out, suspend, hibernate, reboot or shut down the computer",
33
"uuid": "Exit@claudiux",
44
"name": "Exit",
5-
"version": "1.1.2",
5+
"version": "1.2.0",
66
"max-instances": -1,
77
"author": "claudiux"
88
}

Exit@claudiux/files/Exit@claudiux/po/[email protected]

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
1-
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3-
# This file is distributed under the same license as the PACKAGE package.
4-
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
1+
# EXIT
2+
# This file is put in the public domain.
3+
# claudiux, 2024
54
#
65
#, fuzzy
76
msgid ""
87
msgstr ""
9-
"Project-Id-Version: PACKAGE VERSION\n"
10-
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2024-01-25 23:19+0100\n"
12-
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13-
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14-
"Language-Team: LANGUAGE <[email protected]>\n"
8+
"Project-Id-Version: Exit@claudiux 1.2.0\n"
9+
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/"
10+
"issues\n"
11+
"POT-Creation-Date: 2024-09-29 21:43+0200\n"
12+
"PO-Revision-Date: \n"
13+
"Last-Translator: \n"
14+
"Language-Team: \n"
1515
"Language: \n"
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919

20-
#: 5.4/applet.js:96
20+
#. 5.4/applet.js:110
2121
msgid "Restart Cinnamon"
2222
msgstr ""
2323

24-
#: 5.4/applet.js:108
24+
#. 5.4/applet.js:122
2525
msgid "Lock Screen"
2626
msgstr ""
2727

28-
#: 5.4/applet.js:131 5.4/applet.js:141 5.4/applet.js:150
28+
#. 5.4/applet.js:145 5.4/applet.js:155 5.4/applet.js:164
2929
msgid "Switch User"
3030
msgstr ""
3131

32-
#: 5.4/applet.js:166
32+
#. 5.4/applet.js:180
3333
msgid "Log Out"
3434
msgstr ""
3535

36-
#: 5.4/applet.js:178
36+
#. 5.4/applet.js:192
3737
msgid "Suspend"
3838
msgstr ""
3939

40-
#: 5.4/applet.js:187
40+
#. 5.4/applet.js:201
4141
msgid "Hibernate"
4242
msgstr ""
4343

44-
#: 5.4/applet.js:199
44+
#. 5.4/applet.js:216
4545
msgid "Restart"
4646
msgstr ""
4747

48-
#: 5.4/applet.js:208
48+
#. 5.4/applet.js:225
4949
msgid "Power Off"
5050
msgstr ""
5151

@@ -87,6 +87,10 @@ msgstr ""
8787
msgid "Show the Hibernate option"
8888
msgstr ""
8989

90+
#. 5.4->settings-schema.json->hibernateNeedsSudo->description
91+
msgid "Hibernate needs root user rights (sudo)"
92+
msgstr ""
93+
9094
#. 5.4->settings-schema.json->showRestart->description
9195
msgid "Show the Restart option"
9296
msgstr ""

Exit@claudiux/files/Exit@claudiux/po/ca.po

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
# SOME DESCRIPTIVE TITLE.
1+
# EXIT
22
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
33
# This file is distributed under the same license as the PACKAGE package.
4-
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4+
# claudiux, 2024
55
#
66
#, fuzzy
77
msgid ""
88
msgstr ""
99
"Project-Id-Version: \n"
10-
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2024-01-25 23:19+0100\n"
10+
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/"
11+
"issues\n"
12+
"POT-Creation-Date: 2024-09-29 21:43+0200\n"
1213
"PO-Revision-Date: 2024-07-03 23:49+0200\n"
1314
"Last-Translator: Odyssey <[email protected]>\n"
1415
"Language-Team: \n"
@@ -18,35 +19,35 @@ msgstr ""
1819
"Content-Transfer-Encoding: 8bit\n"
1920
"X-Generator: Poedit 3.4.2\n"
2021

21-
#: 5.4/applet.js:96
22+
#. 5.4/applet.js:110
2223
msgid "Restart Cinnamon"
2324
msgstr "Reiniciar Cinnamon"
2425

25-
#: 5.4/applet.js:108
26+
#. 5.4/applet.js:122
2627
msgid "Lock Screen"
2728
msgstr "Bloquejar la pantalla"
2829

29-
#: 5.4/applet.js:131 5.4/applet.js:141 5.4/applet.js:150
30+
#. 5.4/applet.js:145 5.4/applet.js:155 5.4/applet.js:164
3031
msgid "Switch User"
3132
msgstr "Canviar d'usuari"
3233

33-
#: 5.4/applet.js:166
34+
#. 5.4/applet.js:180
3435
msgid "Log Out"
3536
msgstr "Tancar la sessió"
3637

37-
#: 5.4/applet.js:178
38+
#. 5.4/applet.js:192
3839
msgid "Suspend"
3940
msgstr "Suspendre"
4041

41-
#: 5.4/applet.js:187
42+
#. 5.4/applet.js:201
4243
msgid "Hibernate"
4344
msgstr "Hivernar"
4445

45-
#: 5.4/applet.js:199
46+
#. 5.4/applet.js:216
4647
msgid "Restart"
4748
msgstr "Reiniciar"
4849

49-
#: 5.4/applet.js:208
50+
#. 5.4/applet.js:225
5051
msgid "Power Off"
5152
msgstr "Apagar"
5253

@@ -90,6 +91,10 @@ msgstr "Mostrar la opció de suspendre l'equip"
9091
msgid "Show the Hibernate option"
9192
msgstr "Mostrar la opció d'hivernar l'equip"
9293

94+
#. 5.4->settings-schema.json->hibernateNeedsSudo->description
95+
msgid "Hibernate needs root user rights (sudo)"
96+
msgstr ""
97+
9398
#. 5.4->settings-schema.json->showRestart->description
9499
msgid "Show the Restart option"
95100
msgstr "Mostrar la opció de reiniciar l'equip"
@@ -103,8 +108,8 @@ msgid ""
103108
"All the menu options below may be managed by the system.\n"
104109
"If they are, you can't see them."
105110
msgstr ""
106-
"És possible que el sistema administri algunes o totes les opcions "
107-
"llistades a continuació.\n"
111+
"És possible que el sistema administri algunes o totes les opcions llistades "
112+
"a continuació.\n"
108113
"En cas afirmatiu, no les podreu veure."
109114

110115
#. 5.4->settings-schema.json->showLockscreen->description

Exit@claudiux/files/Exit@claudiux/po/de.po

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,53 @@
1-
# SOME DESCRIPTIVE TITLE.
1+
# EXIT
22
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
33
# This file is distributed under the same license as the PACKAGE package.
4-
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4+
# claudiux, 2024
55
#
66
msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
9-
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2024-01-25 23:19+0100\n"
9+
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/"
10+
"issues\n"
11+
"POT-Creation-Date: 2024-09-29 21:43+0200\n"
1112
"PO-Revision-Date: 2024-02-14 22:09+0100\n"
13+
"Last-Translator: \n"
1214
"Language-Team: \n"
15+
"Language: de\n"
1316
"MIME-Version: 1.0\n"
1417
"Content-Type: text/plain; charset=UTF-8\n"
1518
"Content-Transfer-Encoding: 8bit\n"
1619
"X-Generator: Poedit 2.3\n"
17-
"Last-Translator: \n"
1820
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
19-
"Language: de\n"
2021

21-
#: 5.4/applet.js:96
22+
#. 5.4/applet.js:110
2223
msgid "Restart Cinnamon"
2324
msgstr "Starte Cinnamon neu"
2425

25-
#: 5.4/applet.js:108
26+
#. 5.4/applet.js:122
2627
msgid "Lock Screen"
2728
msgstr "Bildschirm sperren"
2829

29-
#: 5.4/applet.js:131 5.4/applet.js:141 5.4/applet.js:150
30+
#. 5.4/applet.js:145 5.4/applet.js:155 5.4/applet.js:164
3031
msgid "Switch User"
3132
msgstr "Benutzer wechseln"
3233

33-
#: 5.4/applet.js:166
34+
#. 5.4/applet.js:180
3435
msgid "Log Out"
3536
msgstr "Abmelden"
3637

37-
#: 5.4/applet.js:178
38+
#. 5.4/applet.js:192
3839
msgid "Suspend"
3940
msgstr "Bereitschaft"
4041

41-
#: 5.4/applet.js:187
42+
#. 5.4/applet.js:201
4243
msgid "Hibernate"
4344
msgstr "Ruhezustand"
4445

45-
#: 5.4/applet.js:199
46+
#. 5.4/applet.js:216
4647
msgid "Restart"
4748
msgstr "Neustart"
4849

49-
#: 5.4/applet.js:208
50+
#. 5.4/applet.js:225
5051
msgid "Power Off"
5152
msgstr "Ausschalten"
5253

@@ -90,6 +91,10 @@ msgstr "Die Option \"Bereitschaft\" anzeigen"
9091
msgid "Show the Hibernate option"
9192
msgstr "Die Option \"Ruhezustand\" anzeigen"
9293

94+
#. 5.4->settings-schema.json->hibernateNeedsSudo->description
95+
msgid "Hibernate needs root user rights (sudo)"
96+
msgstr ""
97+
9398
#. 5.4->settings-schema.json->showRestart->description
9499
msgid "Show the Restart option"
95100
msgstr "Die Option \"Neustart\" anzeigen"
@@ -103,8 +108,7 @@ msgid ""
103108
"All the menu options below may be managed by the system.\n"
104109
"If they are, you can't see them."
105110
msgstr ""
106-
"Alle nachstehenden Menüoptionen werden möglicherweise vom System "
107-
"verwaltet.\n"
111+
"Alle nachstehenden Menüoptionen werden möglicherweise vom System verwaltet.\n"
108112
"Wenn dies der Fall ist, können Sie sie nicht sehen."
109113

110114
#. 5.4->settings-schema.json->showLockscreen->description
@@ -146,5 +150,5 @@ msgid ""
146150
"The 'Force' option lets you log out while ignoring inhibitors. Useful when "
147151
"several sessions are open."
148152
msgstr ""
149-
"Mit der Option \"Erzwingen\" können Sie sich ohne Einschränkungen "
150-
"abmelden. Nützlich, wenn mehrere Sitzungen geöffnet sind."
153+
"Mit der Option \"Erzwingen\" können Sie sich ohne Einschränkungen abmelden. "
154+
"Nützlich, wenn mehrere Sitzungen geöffnet sind."

Exit@claudiux/files/Exit@claudiux/po/es.po

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
# SOME DESCRIPTIVE TITLE.
1+
# EXIT
22
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
33
# This file is distributed under the same license as the PACKAGE package.
4-
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4+
# claudiux, 2024
55
#
66
msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
9-
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2024-01-25 23:19+0100\n"
9+
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/"
10+
"issues\n"
11+
"POT-Creation-Date: 2024-09-29 21:43+0200\n"
1112
"PO-Revision-Date: 2024-01-25 21:03-0300\n"
1213
"Last-Translator: \n"
1314
"Language-Team: \n"
@@ -17,35 +18,35 @@ msgstr ""
1718
"Content-Transfer-Encoding: 8bit\n"
1819
"X-Generator: Poedit 3.4\n"
1920

20-
#: 5.4/applet.js:96
21+
#. 5.4/applet.js:110
2122
msgid "Restart Cinnamon"
2223
msgstr "Reiniciar Cinnamon"
2324

24-
#: 5.4/applet.js:108
25+
#. 5.4/applet.js:122
2526
msgid "Lock Screen"
2627
msgstr "Bloquear pantalla"
2728

28-
#: 5.4/applet.js:131 5.4/applet.js:141 5.4/applet.js:150
29+
#. 5.4/applet.js:145 5.4/applet.js:155 5.4/applet.js:164
2930
msgid "Switch User"
3031
msgstr "Cambiar de usuario"
3132

32-
#: 5.4/applet.js:166
33+
#. 5.4/applet.js:180
3334
msgid "Log Out"
3435
msgstr "Cerrar sesión"
3536

36-
#: 5.4/applet.js:178
37+
#. 5.4/applet.js:192
3738
msgid "Suspend"
3839
msgstr "Suspender"
3940

40-
#: 5.4/applet.js:187
41+
#. 5.4/applet.js:201
4142
msgid "Hibernate"
4243
msgstr "Hibernar"
4344

44-
#: 5.4/applet.js:199
45+
#. 5.4/applet.js:216
4546
msgid "Restart"
4647
msgstr "Reiniciar"
4748

48-
#: 5.4/applet.js:208
49+
#. 5.4/applet.js:225
4950
msgid "Power Off"
5051
msgstr "Apagar"
5152

@@ -89,6 +90,10 @@ msgstr "Mostrar la opción Suspender"
8990
msgid "Show the Hibernate option"
9091
msgstr "Mostrar la opción Hibernar"
9192

93+
#. 5.4->settings-schema.json->hibernateNeedsSudo->description
94+
msgid "Hibernate needs root user rights (sudo)"
95+
msgstr ""
96+
9297
#. 5.4->settings-schema.json->showRestart->description
9398
msgid "Show the Restart option"
9499
msgstr "Mostrar la opción Reiniciar"

0 commit comments

Comments
 (0)