Skip to content

Commit

Permalink
Sensors@claudiux: added functionality to user define a separator stri…
Browse files Browse the repository at this point in the history
…ng (linuxmint#4868)

* added functionality to user define a separator string

* fixed code order + live update

* Revert "fixed code order + live update"

This reverts commit 0318d10.

* fixed code order + live update

* incorporated review remark

---------

Co-authored-by: TimeWaster <[email protected]>
  • Loading branch information
SebiTimeWaster and TimeWaster committed Jun 4, 2023
1 parent c3bca3c commit 8171665
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sensors@claudiux/files/Sensors@claudiux/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ class SensorsApplet extends Applet.TextApplet {
this.s.bind("keep_size", "keep_size", this.updateUI, null);
this.s.bind("char_size", "char_size", this.updateUI, null);
this.s.bind("char_color", "char_color", this.updateUI, null);
this.s.bind("separator", "separator", this.updateUI, null);
this.s.bind("remove_border", "remove_border", this.updateUI, null);
this.s.bind("remove_icons", "remove_icons", this.updateUI, null);
this.s.bind("bold_values", "bold_values", this.updateUI, null);
this.s.bind("bold_italics_main_sensors", "bold_italics_main_sensors", this.updateUI, null);
this.s.bind("restart_in_menu", "restart_in_menu", null, null);


if (this._applet_tooltip.set_markup === undefined) {
this.bold_values = false;
this.bold_italics_main_sensors = false;
Expand Down Expand Up @@ -599,7 +599,7 @@ class SensorsApplet extends Applet.TextApplet {
var _actor_style = "sensors-label%s sensors-size%s".format(_border_type, this.char_size);

let vertical = (this._orientation == St.Side.LEFT || this._orientation == St.Side.RIGHT);
let sep = (vertical) ? "\n" : "│";
let sep = (vertical) ? "\n" : this.separator;
let _shown_name;
this.label_parts = [];

Expand Down
7 changes: 7 additions & 0 deletions Sensors@claudiux/files/Sensors@claudiux/settings-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"keep_size",
"char_size",
"char_color",
"separator",
"remove_border",
"remove_icons",
"bold_values",
Expand Down Expand Up @@ -260,6 +261,12 @@
},
"description": "Text Color"
},
"separator": {
"type": "entry",
"description": "Separator",
"default": "|",
"tooltip": "The string used to separate values in horizontal orientation. Default is '│'."
},
"remove_border": {
"type": "switch",
"default": false,
Expand Down

0 comments on commit 8171665

Please sign in to comment.