From 2ca62111418bcc51dd8c563484544d2b18b824ea Mon Sep 17 00:00:00 2001 From: Laurento Frittella Date: Thu, 23 Apr 2020 22:01:47 +0200 Subject: [PATCH 1/2] Change mode only on right-clicks. --- extension.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/extension.js b/extension.js index 8f189ea..dc6201b 100644 --- a/extension.js +++ b/extension.js @@ -85,13 +85,16 @@ function init() { lastCount = 0; } -function changeMode() { - mode++; - if (mode > 4) { - mode = 0; +function changeMode(data, event) { + // React only to right-clicks. + if (event.get_button() == 3) { + mode++; + if (mode > 4) { + mode = 0; + } + settings.set_int('mode', mode); + parseStat(true); } - settings.set_int('mode', mode); - parseStat(true); } function parseStat(forceDot = false) { From 919b612912e5e2cc8a4b1d2503a82e002921ce52 Mon Sep 17 00:00:00 2001 From: Laurento Frittella Date: Thu, 23 Apr 2020 22:04:57 +0200 Subject: [PATCH 2/2] gnome-shell 3.36, align both label and dot in the middle. --- extension.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extension.js b/extension.js index dc6201b..79cb425 100644 --- a/extension.js +++ b/extension.js @@ -1,3 +1,4 @@ +const Clutter = imports.gi.Clutter; const St = imports.gi.St; const Main = imports.ui.main; // const Tweener = imports.ui.tweener; @@ -56,11 +57,13 @@ function init() { ioSpeedStaticIcon = new St.Icon({ style_class: 'system-status-icon', + y_align: Clutter.ActorAlign.CENTER, gicon: Gio.icon_new_for_string('drive-harddisk-symbolic') }); ioSpeed = new St.Label({ text: '---', + y_align: Clutter.ActorAlign.CENTER, style_class: 'harddiskled-label' }); @@ -71,6 +74,7 @@ function init() { ioSpeedIcon = new St.Label({ text: '', + y_align: Clutter.ActorAlign.CENTER, style_class: 'harddiskled-icon' });