Skip to content

Commit b67dfbc

Browse files
authored
mintoo@sujitagarwal: Version 1.2 (#1548)
* Introduce customization options for button colors and desklet sizing
1 parent 08c6acc commit b67dfbc

12 files changed

Lines changed: 794 additions & 36 deletions

File tree

mintoo@sujitagarwal/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
The Mintoo - The Mint Assistant is a friendly assistant for your Linux Mint that'll make your daily work flow easier. The current version supports the functionalities to lock screen, shutdown, reboot, logout from Linux Mint.
44

5-
More features and customization options coming soon.
5+
### Newly Introduced
6+
- **Desklet Size Control:** You can now adjust the size of the desklet to better fit your desktop layout.
7+
- **Button Color Feature:** Customize the color of the action buttons to match your theme or preference.
8+
- **Button Hover Color Feature:** Set a distinct color for buttons when hovered, enhancing visual feedback and usability.
69

710
Disclaimer - I added the logo from flaticon.com, as they state, that it is Free for personal and commercial purpose with attribution.
811
Icons made by Freepik from www.flaticon.com

mintoo@sujitagarwal/files/mintoo@sujitagarwal/desklet.js

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const Desklet = imports.ui.desklet;
33
const GLib = imports.gi.GLib;
44
const Util = imports.misc.util;
55
const Gettext = imports.gettext;
6+
const Settings = imports.ui.settings;
67

78
const uuid = "mintoo@sujitagarwal";
89

@@ -18,6 +19,13 @@ class MintooDesklet extends Desklet.Desklet {
1819
this.metadata = metadata;
1920
this.uuid = this.metadata["uuid"];
2021

22+
// Add this line to load settings
23+
this.settings = new Settings.DeskletSettings(this, this.uuid, this.metadata["instanceId"]);
24+
this.settings.bind("desklet-size", "deskletSize", this._onSettingsChanged.bind(this));
25+
this.settings.bind("button-color", "buttonColor", this._onSettingsChanged.bind(this));
26+
this.settings.bind("button-hover-color", "buttonHoverColor", this._onSettingsChanged.bind(this));
27+
this.settings.bind("button-radius", "borderRadius", this._onSettingsChanged.bind(this));
28+
2129
this._createUI();
2230
}
2331

@@ -36,9 +44,22 @@ class MintooDesklet extends Desklet.Desklet {
3644
{ className: "mintoo-button mintoo-button-four", action: this._rebootClickAction }
3745
];
3846

47+
let defaultColor = this.buttonColor; // Default color if not set
48+
3949
buttonSettings.forEach((btn, index) => {
40-
const button = new St.Button({ style_class: btn.className });
50+
const button = new St.Button({
51+
style_class: btn.className,
52+
width: this.deskletSize,
53+
height: this.deskletSize,
54+
});
55+
button.set_style(`background-color: ${this.buttonColor || defaultColor};`);
4156
button.connect("clicked", btn.action.bind(this));
57+
button.connect("enter-event", () => {
58+
button.set_style(`background-color: ${this.buttonHoverColor};`);
59+
});
60+
button.connect("leave-event", () => {
61+
button.set_style(`background-color: ${this.buttonColor};`);
62+
});
4263
if (index < 2) {
4364
this._row1.add(button);
4465
} else {
@@ -48,10 +69,13 @@ class MintooDesklet extends Desklet.Desklet {
4869

4970
this._container.add(this._row1);
5071
this._container.add(this._row2);
51-
5272
this.setContent(this._container);
5373
}
5474

75+
_onSettingsChanged() {
76+
this._createUI();
77+
}
78+
5579
_lockClickAction() {
5680
Util.spawnCommandLine("cinnamon-screensaver-command -l");
5781
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"uuid": "mintoo@sujitagarwal",
33
"name": "Mintoo - The Mint Assistant",
4-
"description": "A friendly assistant for your Linux Mint.",
5-
"version": "1.1",
4+
"description": "A friendly assistant for your Linux Mint. Now with more features to customize the look and feel!",
5+
"version": "1.2",
66
"max-instances": "1",
77
"prevent-decorations": true
88
}

mintoo@sujitagarwal/files/mintoo@sujitagarwal/po/ca.po

Lines changed: 114 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgstr ""
77
"Project-Id-Version: mintoo@sujitagarwal 1.0\n"
88
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
99
"issues\n"
10-
"POT-Creation-Date: 2024-05-18 09:20+0200\n"
10+
"POT-Creation-Date: 2025-08-15 14:52-0400\n"
1111
"PO-Revision-Date: 2024-05-18 09:22+0200\n"
1212
"Last-Translator: Daniel <d3vf4n (at) tutanota (dot) com>\n"
1313
"Language-Team: \n"
@@ -23,5 +23,116 @@ msgid "Mintoo - The Mint Assistant"
2323
msgstr "Mintoo - l'assistent Mint"
2424

2525
#. metadata.json->description
26-
msgid "A friendly assistant for your Linux Mint."
27-
msgstr "Un assistent amigable per al LinuxMint."
26+
msgid ""
27+
"A friendly assistant for your Linux Mint. Now with more features to "
28+
"customize the look and feel!"
29+
msgstr ""
30+
31+
#. settings-schema.json->head0->description
32+
msgid "Settings for Mintoo"
33+
msgstr ""
34+
35+
#. settings-schema.json->desklet-size->units
36+
msgid "pixels"
37+
msgstr ""
38+
39+
#. settings-schema.json->desklet-size->description
40+
msgid "Desklet size"
41+
msgstr ""
42+
43+
#. settings-schema.json->desklet-size->tooltip
44+
msgid "Increase or decrease the size of the Mintoo Desklet."
45+
msgstr ""
46+
47+
#. settings-schema.json->button-color->description
48+
msgid "Button Color"
49+
msgstr ""
50+
51+
#. settings-schema.json->button-color->options
52+
#. settings-schema.json->button-hover-color->options
53+
msgid "Linux Mint Green"
54+
msgstr ""
55+
56+
#. settings-schema.json->button-color->options
57+
#. settings-schema.json->button-hover-color->options
58+
msgid "Black"
59+
msgstr ""
60+
61+
#. settings-schema.json->button-color->options
62+
#. settings-schema.json->button-hover-color->options
63+
msgid "Blue (Light)"
64+
msgstr ""
65+
66+
#. settings-schema.json->button-color->options
67+
#. settings-schema.json->button-hover-color->options
68+
msgid "Blue (Dark)"
69+
msgstr ""
70+
71+
#. settings-schema.json->button-color->options
72+
#. settings-schema.json->button-hover-color->options
73+
msgid "Green (Light)"
74+
msgstr ""
75+
76+
#. settings-schema.json->button-color->options
77+
#. settings-schema.json->button-hover-color->options
78+
msgid "Green (Dark)"
79+
msgstr ""
80+
81+
#. settings-schema.json->button-color->options
82+
#. settings-schema.json->button-hover-color->options
83+
msgid "Red (Light)"
84+
msgstr ""
85+
86+
#. settings-schema.json->button-color->options
87+
#. settings-schema.json->button-hover-color->options
88+
msgid "Red (Dark)"
89+
msgstr ""
90+
91+
#. settings-schema.json->button-color->options
92+
#. settings-schema.json->button-hover-color->options
93+
msgid "Purple (Light)"
94+
msgstr ""
95+
96+
#. settings-schema.json->button-color->options
97+
#. settings-schema.json->button-hover-color->options
98+
msgid "Purple (Dark)"
99+
msgstr ""
100+
101+
#. settings-schema.json->button-color->options
102+
#. settings-schema.json->button-hover-color->options
103+
msgid "Orange (Light)"
104+
msgstr ""
105+
106+
#. settings-schema.json->button-color->options
107+
#. settings-schema.json->button-hover-color->options
108+
msgid "Orange (Dark)"
109+
msgstr ""
110+
111+
#. settings-schema.json->button-color->options
112+
#. settings-schema.json->button-hover-color->options
113+
msgid "Pink (Light)"
114+
msgstr ""
115+
116+
#. settings-schema.json->button-color->options
117+
#. settings-schema.json->button-hover-color->options
118+
msgid "Pink (Dark)"
119+
msgstr ""
120+
121+
#. settings-schema.json->button-color->options
122+
#. settings-schema.json->button-hover-color->options
123+
msgid "Gray (Light)"
124+
msgstr ""
125+
126+
#. settings-schema.json->button-color->options
127+
#. settings-schema.json->button-hover-color->options
128+
msgid "Gray (Dark)"
129+
msgstr ""
130+
131+
#. settings-schema.json->button-color->tooltip
132+
#. settings-schema.json->button-hover-color->tooltip
133+
msgid "Select the button hover style."
134+
msgstr ""
135+
136+
#. settings-schema.json->button-hover-color->description
137+
msgid "Button Hover Color"
138+
msgstr ""

mintoo@sujitagarwal/files/mintoo@sujitagarwal/po/de.po

Lines changed: 116 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# SOME DESCRIPTIVE TITLE.
1+
# MINTOO - THE MINT ASSISTANT
22
# This file is put in the public domain.
3-
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
3+
# sujitagarwal, 2020
44
#
55
msgid ""
66
msgstr ""
77
"Project-Id-Version: mintoo@sujitagarwal 1.0\n"
88
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
99
"issues\n"
10-
"POT-Creation-Date: 2024-05-18 09:20+0200\n"
10+
"POT-Creation-Date: 2025-08-15 14:52-0400\n"
1111
"PO-Revision-Date: 2024-11-28 22:47+0100\n"
1212
"Last-Translator: \n"
1313
"Language-Team: \n"
@@ -23,5 +23,116 @@ msgid "Mintoo - The Mint Assistant"
2323
msgstr "Mintoo - Der Mint Assistent"
2424

2525
#. metadata.json->description
26-
msgid "A friendly assistant for your Linux Mint."
27-
msgstr "Ein freundlicher Assistent für dein Linux Mint."
26+
msgid ""
27+
"A friendly assistant for your Linux Mint. Now with more features to "
28+
"customize the look and feel!"
29+
msgstr ""
30+
31+
#. settings-schema.json->head0->description
32+
msgid "Settings for Mintoo"
33+
msgstr ""
34+
35+
#. settings-schema.json->desklet-size->units
36+
msgid "pixels"
37+
msgstr ""
38+
39+
#. settings-schema.json->desklet-size->description
40+
msgid "Desklet size"
41+
msgstr ""
42+
43+
#. settings-schema.json->desklet-size->tooltip
44+
msgid "Increase or decrease the size of the Mintoo Desklet."
45+
msgstr ""
46+
47+
#. settings-schema.json->button-color->description
48+
msgid "Button Color"
49+
msgstr ""
50+
51+
#. settings-schema.json->button-color->options
52+
#. settings-schema.json->button-hover-color->options
53+
msgid "Linux Mint Green"
54+
msgstr ""
55+
56+
#. settings-schema.json->button-color->options
57+
#. settings-schema.json->button-hover-color->options
58+
msgid "Black"
59+
msgstr ""
60+
61+
#. settings-schema.json->button-color->options
62+
#. settings-schema.json->button-hover-color->options
63+
msgid "Blue (Light)"
64+
msgstr ""
65+
66+
#. settings-schema.json->button-color->options
67+
#. settings-schema.json->button-hover-color->options
68+
msgid "Blue (Dark)"
69+
msgstr ""
70+
71+
#. settings-schema.json->button-color->options
72+
#. settings-schema.json->button-hover-color->options
73+
msgid "Green (Light)"
74+
msgstr ""
75+
76+
#. settings-schema.json->button-color->options
77+
#. settings-schema.json->button-hover-color->options
78+
msgid "Green (Dark)"
79+
msgstr ""
80+
81+
#. settings-schema.json->button-color->options
82+
#. settings-schema.json->button-hover-color->options
83+
msgid "Red (Light)"
84+
msgstr ""
85+
86+
#. settings-schema.json->button-color->options
87+
#. settings-schema.json->button-hover-color->options
88+
msgid "Red (Dark)"
89+
msgstr ""
90+
91+
#. settings-schema.json->button-color->options
92+
#. settings-schema.json->button-hover-color->options
93+
msgid "Purple (Light)"
94+
msgstr ""
95+
96+
#. settings-schema.json->button-color->options
97+
#. settings-schema.json->button-hover-color->options
98+
msgid "Purple (Dark)"
99+
msgstr ""
100+
101+
#. settings-schema.json->button-color->options
102+
#. settings-schema.json->button-hover-color->options
103+
msgid "Orange (Light)"
104+
msgstr ""
105+
106+
#. settings-schema.json->button-color->options
107+
#. settings-schema.json->button-hover-color->options
108+
msgid "Orange (Dark)"
109+
msgstr ""
110+
111+
#. settings-schema.json->button-color->options
112+
#. settings-schema.json->button-hover-color->options
113+
msgid "Pink (Light)"
114+
msgstr ""
115+
116+
#. settings-schema.json->button-color->options
117+
#. settings-schema.json->button-hover-color->options
118+
msgid "Pink (Dark)"
119+
msgstr ""
120+
121+
#. settings-schema.json->button-color->options
122+
#. settings-schema.json->button-hover-color->options
123+
msgid "Gray (Light)"
124+
msgstr ""
125+
126+
#. settings-schema.json->button-color->options
127+
#. settings-schema.json->button-hover-color->options
128+
msgid "Gray (Dark)"
129+
msgstr ""
130+
131+
#. settings-schema.json->button-color->tooltip
132+
#. settings-schema.json->button-hover-color->tooltip
133+
msgid "Select the button hover style."
134+
msgstr ""
135+
136+
#. settings-schema.json->button-hover-color->description
137+
msgid "Button Hover Color"
138+
msgstr ""

0 commit comments

Comments
 (0)