diff --git a/CMUD@sonichy/extension.js b/CMUD@sonichy/extension.js index 079ab4d..2947848 100755 --- a/CMUD@sonichy/extension.js +++ b/CMUD@sonichy/extension.js @@ -41,7 +41,7 @@ export default class CMUDExtension extends Extension { //this._indicator.menu.addMenuItem(menuItem); this.label_tooltip = new St.Label({ text: '' }); - this.label_tooltip.set_style('background:#222; padding:10px; border:1px solid #aaa; border-radius:10px;'); + this.label_tooltip.set_style('background:rgba(10,10,10,0.8); padding:10px; border:1px solid #aaa; border-radius:10px; font-family:Noto Mono'); global.stage.add_child(this.label_tooltip); this.label_tooltip.hide(); this._indicator.connect('notify::hover', () => { @@ -50,10 +50,10 @@ export default class CMUDExtension extends Extension { if (x == 0 && y != 0) //LEFT this.label_tooltip.set_position(x + this._indicator.width + 1, y); else if (x != 0 && y == 0) //TOP - this.label_tooltip.set_position(x, y + this._indicator.height + 1); + this.label_tooltip.set_position(x - this.label_tooltip.width / 2 + this._indicator.width / 2, y + this._indicator.height + 1); else if (this._indicator.height == Main.panel.height) //BOTTOM - this.label_tooltip.set_position(x, y - this.label_tooltip.height - 1); + this.label_tooltip.set_position(x - this.label_tooltip.width / 2 + this._indicator.width / 2, y - this.label_tooltip.height - 1); else //RIGHT this.label_tooltip.set_position(x - this.label_tooltip.width - 1, y); if (this._indicator.hover) @@ -69,7 +69,7 @@ export default class CMUDExtension extends Extension { area_mem.queue_repaint(); this.cpu(); area_cpu.queue_repaint(); - var s = 'Uptime: ' + this.uptime() + '\nCPU: ' + cp + '%\nMem: ' + this.mem() + '\nUp: ' + this.B2G(net.ub) + '\nDown: ' + this.B2G(net.db); + var s = 'UPT: ' + this.uptime() + '\nCPU: ' + cp + '%\nMEM: ' + this.mem() + '\nUPB: ' + this.B2G(net.ub) + '\nDNB: ' + this.B2G(net.db); //menuItem.label.text = s; this.label_tooltip.text = s; // Run as loop, not once. diff --git a/CMUD@sonichy/metadata.json b/CMUD@sonichy/metadata.json index ecfa62c..35fe37f 100644 --- a/CMUD@sonichy/metadata.json +++ b/CMUD@sonichy/metadata.json @@ -1,9 +1,15 @@ { + "_generated": "Generated by SweetTooth, do not edit", "author": "sonichy", "description": "Display uptime, cpu, memory, upload, download on GNOME taskbar.", "name": "CMUD", - "shell-version": [ "45", "46", "47", "48" ], + "shell-version": [ + "45", + "46", + "47", + "48" + ], "url": "https://github.com/sonichy/GNOME_extension", "uuid": "CMUD@sonichy", - "version": 1.1 -} + "version": 7 +} \ No newline at end of file diff --git a/CMUD@sonichy/preview.png b/CMUD@sonichy/preview.png index 4ed8bc6..addcb86 100644 Binary files a/CMUD@sonichy/preview.png and b/CMUD@sonichy/preview.png differ