Skip to content

Commit cb74ec5

Browse files
authored
OSD150 v2.0.0: You can now change the position of the OSD window (#1040)
Requested by @Galathorne on https://cinnamon-spices.linuxmint.com/applets/view/306#count
1 parent ed4981c commit cb74ec5

16 files changed

Lines changed: 417 additions & 22 deletions

File tree

OSD150@claudiux/files/OSD150@claudiux/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### v2.0.0~20260418
2+
* You can now change the position of the OSD window.
3+
14
### v1.0.2~20260320
25
* Makes the volume bar more smoother.
36
* Fixes a bug.
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
OSD Window 150, extension fully handled by the [Enhanced Sound Applet (sound150@claudiux)](https://cinnamon-spices.linuxmint.com/applets/view/306).
1+
OSD Window 150, extension fully handled by the [Enhanced Sound Applet (sound150@claudiux)](https://cinnamon-spices.linuxmint.com/applets/view/306) and the [Radio3.0](https://cinnamon-spices.linuxmint.com/applets/view/360) applet.
22

33
This extension allows to display an OSD window that can be:
44

@@ -8,4 +8,6 @@ This extension allows to display an OSD window that can be:
88
* horizontal (the level value appears alongside the level bar),
99
* vertical (the level value appears above the level bar).
1010

11-
All these options can be set from the Sound tab (OSD section) of the Enhanced Sound Applet settings.
11+
* Settings (from v2.0.0): You can now change the position of the OSD window.
12+
13+
All these options can be set from the Sound tab (OSD section) of the [Enhanced Sound Applet](https://cinnamon-spices.linuxmint.com/applets/view/306) settings, or from the Behavior tab of the [Radio3.0](https://cinnamon-spices.linuxmint.com/applets/view/360) applet.

OSD150@claudiux/files/OSD150@claudiux/extension.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
const Main = imports.ui.main;
22
const OsdWindow = imports.ui.osdWindow;
3+
const Settings = imports.ui.settings;
34

45
const Osd150 = require('./osd150');
6+
var UUID;
7+
var OSD150_settings = {};
58

69
class MyExtension {
710
constructor(meta) {
811
this._meta = meta;
12+
13+
14+
this.settings = new Settings.ExtensionSettings(OSD150_settings, UUID, meta.uuid);
15+
this.settings.bind("OSDxLocation", "xRelocation");
16+
this.settings.bind("OSDyLocation", "yRelocation");
917
}
1018

1119
enable() {
12-
Main.osdWindowManager = new Osd150.OsdWindowManager();
20+
Main.osdWindowManager = new Osd150.OsdWindowManager(OSD150_settings);
1321
}
1422

1523
disable() {
@@ -39,5 +47,6 @@ function disable() {
3947
}
4048

4149
function init(metadata) {
50+
UUID = metadata.uuid;
4251
extension = new MyExtension(metadata);
4352
}

OSD150@claudiux/files/OSD150@claudiux/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"uuid": "OSD150@claudiux",
33
"name": "OSD Window for sound150",
44
"author": "claudiux",
5-
"version": "1.0.2",
5+
"version": "2.0.0",
66
"description": "The OSD Window handled by the Enhanced Sound Applet",
77
"cinnamon-version": [
88
"6.4"

OSD150@claudiux/files/OSD150@claudiux/osd150.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ class OsdWindow extends Clutter.Actor {
163163
);
164164

165165
var OsdWindowManager = class {
166-
constructor() {
166+
constructor(settings) {
167+
this.settings = settings;
167168
this._osdWindows = [];
168169

169170
Main.layoutManager.connect('monitors-changed', () => { this._layoutChanged() });
@@ -217,6 +218,10 @@ var OsdWindowManager = class {
217218
this._osdWindows[monitorIndex].setLabel(label);
218219
this._osdWindows[monitorIndex].setMaxLevel(maxLevel);
219220
this._osdWindows[monitorIndex].setLevel(level);
221+
222+
this._osdWindows[monitorIndex].translation_y = this.settings.yRelocation;
223+
this._osdWindows[monitorIndex].translation_x = this.settings.xRelocation;
224+
220225
this._osdWindows[monitorIndex].show();
221226
}
222227

OSD150@claudiux/files/OSD150@claudiux/po/OSD150@claudiux.pot

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# OSD WINDOW FOR SOUND150
22
# This file is put in the public domain.
3-
# claudiux, 2017
3+
# claudiux, 2025
44
#
55
#, fuzzy
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: OSD150@claudiux 1.0.0\n"
8+
"Project-Id-Version: OSD150@claudiux 2.0.0\n"
99
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
1010
"extensions/issues\n"
11-
"POT-Creation-Date: 2025-02-09 00:05+0100\n"
11+
"POT-Creation-Date: 2026-04-19 01:17+0200\n"
1212
"PO-Revision-Date: \n"
1313
"Last-Translator: \n"
1414
"Language-Team: \n"
@@ -24,3 +24,35 @@ msgstr ""
2424
#. metadata.json->description
2525
msgid "The OSD Window handled by the Enhanced Sound Applet"
2626
msgstr ""
27+
28+
#. settings-schema.json->pagePosition->title
29+
msgid "Location"
30+
msgstr ""
31+
32+
#. settings-schema.json->sectionOSDxLocation->title
33+
msgid "Relative horizontal location"
34+
msgstr ""
35+
36+
#. settings-schema.json->sectionOSDyLocation->title
37+
msgid "Relative Vertical location"
38+
msgstr ""
39+
40+
#. settings-schema.json->OSDxLocation->description
41+
msgid "Horizontal offset from the default position (in pixels)"
42+
msgstr ""
43+
44+
#. settings-schema.json->OSDxLocation->tooltip
45+
msgid ""
46+
"Negative value: to the left.\n"
47+
"Positive value: to the right."
48+
msgstr ""
49+
50+
#. settings-schema.json->OSDyLocation->description
51+
msgid "Vertical offset from the default position (in pixels)"
52+
msgstr ""
53+
54+
#. settings-schema.json->OSDyLocation->tooltip
55+
msgid ""
56+
"Negative value: to the top.\n"
57+
"Positive value: to the bottom."
58+
msgstr ""

OSD150@claudiux/files/OSD150@claudiux/po/ca.po

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: OSD150@claudiux 1.0.0\n"
99
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
1010
"extensions/issues\n"
11-
"POT-Creation-Date: 2025-02-09 00:05+0100\n"
11+
"POT-Creation-Date: 2026-04-19 01:17+0200\n"
1212
"PO-Revision-Date: \n"
1313
"Last-Translator: Odyssey <odysseyhyd@gmail.com>\n"
1414
"Language-Team: \n"
@@ -24,5 +24,36 @@ msgstr "Finestra de visualització en pantalla (OSD) per a sound150"
2424

2525
#. metadata.json->description
2626
msgid "The OSD Window handled by the Enhanced Sound Applet"
27+
msgstr "La finestra OSD gestionada per la miniaplicació de so millorat"
28+
29+
#. settings-schema.json->pagePosition->title
30+
msgid "Location"
31+
msgstr ""
32+
33+
#. settings-schema.json->sectionOSDxLocation->title
34+
msgid "Relative horizontal location"
35+
msgstr ""
36+
37+
#. settings-schema.json->sectionOSDyLocation->title
38+
msgid "Relative Vertical location"
39+
msgstr ""
40+
41+
#. settings-schema.json->OSDxLocation->description
42+
msgid "Horizontal offset from the default position (in pixels)"
43+
msgstr ""
44+
45+
#. settings-schema.json->OSDxLocation->tooltip
46+
msgid ""
47+
"Negative value: to the left.\n"
48+
"Positive value: to the right."
49+
msgstr ""
50+
51+
#. settings-schema.json->OSDyLocation->description
52+
msgid "Vertical offset from the default position (in pixels)"
53+
msgstr ""
54+
55+
#. settings-schema.json->OSDyLocation->tooltip
56+
msgid ""
57+
"Negative value: to the top.\n"
58+
"Positive value: to the bottom."
2759
msgstr ""
28-
"La finestra OSD gestionada per la miniaplicació de so millorat"

OSD150@claudiux/files/OSD150@claudiux/po/da.po

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: OSD150@claudiux 1.0.0\n"
99
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
1010
"extensions/issues\n"
11-
"POT-Creation-Date: 2025-02-09 00:05+0100\n"
11+
"POT-Creation-Date: 2026-04-19 01:17+0200\n"
1212
"PO-Revision-Date: \n"
1313
"Last-Translator: Alan Mortensen <alanmortensen.am@gmail.com>\n"
1414
"Language-Team: \n"
@@ -25,3 +25,35 @@ msgstr "OSD-vindue til sound150"
2525
#. metadata.json->description
2626
msgid "The OSD Window handled by the Enhanced Sound Applet"
2727
msgstr "OSD-vinduet håndteret af det forbedrede lydpanelprogram"
28+
29+
#. settings-schema.json->pagePosition->title
30+
msgid "Location"
31+
msgstr ""
32+
33+
#. settings-schema.json->sectionOSDxLocation->title
34+
msgid "Relative horizontal location"
35+
msgstr ""
36+
37+
#. settings-schema.json->sectionOSDyLocation->title
38+
msgid "Relative Vertical location"
39+
msgstr ""
40+
41+
#. settings-schema.json->OSDxLocation->description
42+
msgid "Horizontal offset from the default position (in pixels)"
43+
msgstr ""
44+
45+
#. settings-schema.json->OSDxLocation->tooltip
46+
msgid ""
47+
"Negative value: to the left.\n"
48+
"Positive value: to the right."
49+
msgstr ""
50+
51+
#. settings-schema.json->OSDyLocation->description
52+
msgid "Vertical offset from the default position (in pixels)"
53+
msgstr ""
54+
55+
#. settings-schema.json->OSDyLocation->tooltip
56+
msgid ""
57+
"Negative value: to the top.\n"
58+
"Positive value: to the bottom."
59+
msgstr ""

OSD150@claudiux/files/OSD150@claudiux/po/de.po

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: OSD150@claudiux 1.0.0\n"
99
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
1010
"extensions/issues\n"
11-
"POT-Creation-Date: 2025-02-09 00:05+0100\n"
11+
"POT-Creation-Date: 2026-04-19 01:17+0200\n"
1212
"PO-Revision-Date: \n"
1313
"Last-Translator: conny3496\n"
1414
"Language-Team: \n"
@@ -24,4 +24,38 @@ msgstr "OSD für sound150"
2424

2525
#. metadata.json->description
2626
msgid "The OSD Window handled by the Enhanced Sound Applet"
27-
msgstr "Eine Bildschirmanzeige (On-Screen Display) für das Enhanced Sound Applet (sound150)"
27+
msgstr ""
28+
"Eine Bildschirmanzeige (On-Screen Display) für das Enhanced Sound Applet "
29+
"(sound150)"
30+
31+
#. settings-schema.json->pagePosition->title
32+
msgid "Location"
33+
msgstr ""
34+
35+
#. settings-schema.json->sectionOSDxLocation->title
36+
msgid "Relative horizontal location"
37+
msgstr ""
38+
39+
#. settings-schema.json->sectionOSDyLocation->title
40+
msgid "Relative Vertical location"
41+
msgstr ""
42+
43+
#. settings-schema.json->OSDxLocation->description
44+
msgid "Horizontal offset from the default position (in pixels)"
45+
msgstr ""
46+
47+
#. settings-schema.json->OSDxLocation->tooltip
48+
msgid ""
49+
"Negative value: to the left.\n"
50+
"Positive value: to the right."
51+
msgstr ""
52+
53+
#. settings-schema.json->OSDyLocation->description
54+
msgid "Vertical offset from the default position (in pixels)"
55+
msgstr ""
56+
57+
#. settings-schema.json->OSDyLocation->tooltip
58+
msgid ""
59+
"Negative value: to the top.\n"
60+
"Positive value: to the bottom."
61+
msgstr ""

OSD150@claudiux/files/OSD150@claudiux/po/es.po

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgstr ""
77
"Project-Id-Version: OSD150@claudiux 1.0.0\n"
88
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-"
99
"extensions/issues\n"
10-
"POT-Creation-Date: 2025-02-09 00:05+0100\n"
10+
"POT-Creation-Date: 2026-04-19 01:17+0200\n"
1111
"PO-Revision-Date: \n"
1212
"Last-Translator: \n"
1313
"Language-Team: \n"
@@ -24,3 +24,35 @@ msgstr "Ventana OSD para sound150"
2424
#. metadata.json->description
2525
msgid "The OSD Window handled by the Enhanced Sound Applet"
2626
msgstr "La ventana OSD manejada por el Applet de Sonido Mejorado"
27+
28+
#. settings-schema.json->pagePosition->title
29+
msgid "Location"
30+
msgstr ""
31+
32+
#. settings-schema.json->sectionOSDxLocation->title
33+
msgid "Relative horizontal location"
34+
msgstr ""
35+
36+
#. settings-schema.json->sectionOSDyLocation->title
37+
msgid "Relative Vertical location"
38+
msgstr ""
39+
40+
#. settings-schema.json->OSDxLocation->description
41+
msgid "Horizontal offset from the default position (in pixels)"
42+
msgstr ""
43+
44+
#. settings-schema.json->OSDxLocation->tooltip
45+
msgid ""
46+
"Negative value: to the left.\n"
47+
"Positive value: to the right."
48+
msgstr ""
49+
50+
#. settings-schema.json->OSDyLocation->description
51+
msgid "Vertical offset from the default position (in pixels)"
52+
msgstr ""
53+
54+
#. settings-schema.json->OSDyLocation->tooltip
55+
msgid ""
56+
"Negative value: to the top.\n"
57+
"Positive value: to the bottom."
58+
msgstr ""

0 commit comments

Comments
 (0)