diff --git a/README.md b/README.md index 7f3ebbbe..65f01d8c 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,9 @@ Vitals is a GNOME Shell extension for displaying your computer's temperature, vo ## Credits Vitals was originally forked from [gnome-shell-extension-freon](https://github.com/UshakovVasilii/gnome-shell-extension-freon). I was having trouble finding an up to date, resource friendly and fully featured system monitoring tool. My biggest pet peeve was random system delays because of I/O blocking polls, and thus, the idea for Vitals was born! It has been refactored several times over, so most of the code is new or different. -### Icons +## Icons + +### Original Theme * (voltage|fan)-symbolic.svg - inherited from Freon project. * (system|storage)-symbolic.svg - from Pop! OS theme. * temperature-symbolic.svg - [iconnice studio](https://www.iconfinder.com/iconnice). @@ -94,6 +96,12 @@ Vitals was originally forked from [gnome-shell-extension-freon](https://github.c * network\*.svg - [Yannick Lung](https://www.iconfinder.com/yanlu). * Health icon - [Dod Cosmin](https://www.iconfinder.com/icons/458267/cross_doctor_drug_health_healthcare_hospital_icon). +### GNOME Theme +* (battery | storage)-symbolic.svg - from [Adwaita Icon Theme](https://gitlab.gnome.org/GNOME/adwaita-icon-theme). +* (memory | network* | system | voltage)-symbolic.svg - from [Icon Development Kit](https://gitlab.gnome.org/Teams/Design/icon-development-kit). +* fan-symbolic.svg - inherited from [Freon](https://github.com/UshakovVasilii/gnome-shell-extension-freon) project, with mild modifications. +* (temperature | cpu)-symbolic.svg - designed by [daudix](https://github.com/daudix). + ## Disclaimer Sensor data is obtained from the system using hwmon and GTop. Core Coding and the Vitals authors are not responsible for improperly represented data. No warranty expressed or implied. diff --git a/extension.js b/extension.js index 69893db2..d7f0daf1 100644 --- a/extension.js +++ b/extension.js @@ -44,6 +44,10 @@ var VitalsMenuButton = GObject.registerClass({ 'gpu' : { 'icon': 'gpu-symbolic.svg' } } + // list with the prefixes for the according themes, the index of each + // item must match the index on the combo box + this._sensorsIconPathPrefix = ['/icons/original/', '/icons/gnome/']; + this._warnings = []; this._sensorMenuItems = {}; this._hotLabels = {}; @@ -75,6 +79,7 @@ var VitalsMenuButton = GObject.registerClass({ this._addSettingChangedSignal('update-time', this._updateTimeChanged.bind(this)); this._addSettingChangedSignal('position-in-panel', this._positionInPanelChanged.bind(this)); this._addSettingChangedSignal('menu-centered', this._positionInPanelChanged.bind(this)); + this._addSettingChangedSignal('icon-style', this._iconStyleChanged.bind(this)); let settings = [ 'use-higher-precision', 'alphabetize', 'hide-zeros', 'fixed-widths', 'hide-icons', 'unit', 'memory-measurement', 'include-public-ip', 'network-speed-format', 'storage-measurement', 'include-static-info', 'include-static-gpu-info' ]; for (let setting of Object.values(settings)) @@ -291,7 +296,7 @@ var VitalsMenuButton = GObject.registerClass({ } _positionInPanelChanged() { - this.container.get_parent().remove_actor(this.container); + this.container.get_parent().remove_child(this.container); let position = this._positionInPanel(); // allows easily addressable boxes @@ -305,6 +310,27 @@ var VitalsMenuButton = GObject.registerClass({ boxes[position[0]].insert_child_at_index(this.container, position[1]); } + _redrawDetailsMenuIcons() { + // updates the icons on the 'details' menu, the one + // you have to click to appear + this._sensors.resetHistory(); + for (const sensor in this._sensorIcons) { + if (sensor == "gpu") continue; + this._groups[sensor].icon.gicon = Gio.icon_new_for_string(this._sensorIconPath(sensor)); + } + + // gpu's are indexed differently, handle them here + const gpuKeys = Object.keys(this._groups).filter(key => key.startsWith("gpu#")); + gpuKeys.forEach((gpuKey) => { + this._groups[gpuKey].icon.gicon = Gio.icon_new_for_string(this._sensorIconPath("gpu")); + }); + } + + _iconStyleChanged() { + this._redrawDetailsMenuIcons(); + this._redrawMenu(); + } + _removeHotLabel(key) { if (key in this._hotLabels) { let label = this._hotLabels[key]; @@ -498,7 +524,8 @@ var VitalsMenuButton = GObject.registerClass({ let sensorKey = sensor; if(sensor.startsWith('gpu')) sensorKey = 'gpu'; - return this._extensionObject.path + '/icons/' + this._sensorIcons[sensorKey][icon]; + const iconPathPrefixIndex = this._settings.get_int('icon-style'); + return this._extensionObject.path + this._sensorsIconPathPrefix[iconPathPrefixIndex] + this._sensorIcons[sensorKey][icon]; } _ucFirst(string) { diff --git a/icons/battery-symbolic.svg b/icons/gnome/battery-symbolic.svg similarity index 100% rename from icons/battery-symbolic.svg rename to icons/gnome/battery-symbolic.svg diff --git a/icons/gnome/cpu-symbolic.svg b/icons/gnome/cpu-symbolic.svg new file mode 100644 index 00000000..86ca8bf7 --- /dev/null +++ b/icons/gnome/cpu-symbolic.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#2e3436" d="M5 0v2s-.707-.016-1.45.355C2.814 2.727 2 3.668 2 5v1H0v1h2v1H0v1h2v1H0v1h2s-.016.707.355 1.445C2.727 13.187 3.668 14 5 14h1v2h1v-2h1v2h1v-2h1v2h1v-2s.707.016 1.45-.355C13.186 13.273 14 12.332 14 11v-1h2V9h-2V8h2V7h-2V6h2V5h-2c0-1.332-.813-2.273-1.55-2.645C11.706 1.985 11 2 11 2h-1V0H9v2H8V0H7v2H6V0zm0 4h6c.555 0 1 .445 1 1v6c0 .555-.445 1-1 1H5c-.555 0-1-.445-1-1V5c0-.555.445-1 1-1zm0 1v6h6V5z"/></svg> \ No newline at end of file diff --git a/icons/gnome/fan-symbolic.svg b/icons/gnome/fan-symbolic.svg new file mode 100644 index 00000000..ea2b44f7 --- /dev/null +++ b/icons/gnome/fan-symbolic.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g fill="#2e3434"><path d="M8 0c-.234 0-.459.012-.688.031-1.832 1.216-1.77 3.335-.859 5.405A3 3 0 0 1 8 5a3 3 0 0 1 .418.031c.919-2.154 2.91-3.702 3.55-3.968A7.955 7.955 0 0 0 8 0zM4 1.094a7.982 7.982 0 0 0-3.219 3.5c.12 2.215 1.974 3.23 4.225 3.472A3 3 0 0 1 5 8a3 3 0 0 1 .646-1.85C4.248 4.28 3.912 1.787 4 1.094zm9.156 1.968c-1.423-.044-2.706.924-3.719 2.305a3 3 0 0 1 1.35 1.528C13.127 6.624 15.48 7.587 16 8a7.956 7.956 0 0 0-1.438-4.563 3.386 3.386 0 0 0-1.406-.374zm-2.158 4.872L11 8a3 3 0 0 1-.646 1.85c1.398 1.87 1.734 4.363 1.646 5.056a7.982 7.982 0 0 0 3.219-3.5c-.12-2.214-1.972-3.228-4.221-3.472zM0 8c0 1.698.536 3.268 1.438 4.563 1.973.987 3.79-.113 5.128-1.936A3 3 0 0 1 5.22 9.105C2.877 9.38.52 8.413 0 8zm9.547 2.564A3 3 0 0 1 8 11a3 3 0 0 1-.418-.031c-.919 2.154-2.91 3.702-3.55 3.969a7.955 7.955 0 0 0 4.655 1.03c1.833-1.215 1.772-3.334.86-5.404z"/><circle cx="8" cy="8" r="2"/></g></svg> \ No newline at end of file diff --git a/icons/gpu-symbolic.svg b/icons/gnome/gpu-symbolic.svg similarity index 100% rename from icons/gpu-symbolic.svg rename to icons/gnome/gpu-symbolic.svg diff --git a/icons/gnome/memory-symbolic.svg b/icons/gnome/memory-symbolic.svg new file mode 100644 index 00000000..1946901d --- /dev/null +++ b/icons/gnome/memory-symbolic.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g fill="#2e3436"><path d="M3 2C1.34 2 0 3.34 0 5v4c0 1.66 1.34 3 3 3h10c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3zm0 2h10c.555 0 1 .445 1 1v4c0 .555-.445 1-1 1H3c-.555 0-1-.445-1-1V5c0-.555.445-1 1-1z"/><path fill-opacity=".5" d="M4 5h2v4H4zm3 0h2v4H7zm3 0h2v4h-2z"/><path d="M2 10h12v4H2z"/></g></svg> \ No newline at end of file diff --git a/icons/gnome/network-download-symbolic.svg b/icons/gnome/network-download-symbolic.svg new file mode 100644 index 00000000..4fc170b5 --- /dev/null +++ b/icons/gnome/network-download-symbolic.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g fill="#2e3436"><path fill-opacity=".349" d="M12 1a1 1 0 0 1 .707.293l3 3a1 1 0 0 1 0 1.414l-3 3a1 1 0 1 1-1.414-1.414L12.586 6H5c-.55 0-1-.45-1-1s.45-1 1-1h7.586l-1.293-1.293A1 1 0 0 1 12 1zm0 0"/><path d="M4 15a1 1 0 0 1-.707-.293l-3-3a1 1 0 0 1 0-1.414l3-3a1 1 0 1 1 1.414 1.414L3.414 10H11c.55 0 1 .45 1 1s-.45 1-1 1H3.414l1.293 1.293A1 1 0 0 1 4 15zm0 0"/></g></svg> \ No newline at end of file diff --git a/icons/gnome/network-symbolic.svg b/icons/gnome/network-symbolic.svg new file mode 100644 index 00000000..2ff97782 --- /dev/null +++ b/icons/gnome/network-symbolic.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#2e3436" d="M12 1a1 1 0 0 0-.707 1.707L12.586 4H5c-.55 0-1 .45-1 1s.45 1 1 1h7.586l-1.293 1.293a1 1 0 1 0 1.414 1.414l3-3a1 1 0 0 0 0-1.414l-3-3A1 1 0 0 0 12 1zM4 7a.993.993 0 0 0-.707.293l-3 3a1 1 0 0 0 0 1.414l3 3a1 1 0 1 0 1.414-1.414L3.414 12H11c.55 0 1-.45 1-1s-.45-1-1-1H3.414l1.293-1.293A1 1 0 0 0 4 7zm0 0"/></svg> \ No newline at end of file diff --git a/icons/gnome/network-upload-symbolic.svg b/icons/gnome/network-upload-symbolic.svg new file mode 100644 index 00000000..0d67f652 --- /dev/null +++ b/icons/gnome/network-upload-symbolic.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g fill="#2e3436"><path d="M12 1a1 1 0 0 1 .707.293l3 3a1 1 0 0 1 0 1.414l-3 3a1 1 0 1 1-1.414-1.414L12.586 6H5c-.55 0-1-.45-1-1s.45-1 1-1h7.586l-1.293-1.293A1 1 0 0 1 12 1zm0 0"/><path fill-opacity=".349" d="M4 15a1 1 0 0 1-.707-.293l-3-3a1 1 0 0 1 0-1.414l3-3a1 1 0 1 1 1.414 1.414L3.414 10H11c.55 0 1 .45 1 1s-.45 1-1 1H3.414l1.293 1.293A1 1 0 0 1 4 15zm0 0"/></g></svg> \ No newline at end of file diff --git a/icons/gnome/storage-symbolic.svg b/icons/gnome/storage-symbolic.svg new file mode 100644 index 00000000..30d90078 --- /dev/null +++ b/icons/gnome/storage-symbolic.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#2e3436" d="M4 0C2.355 0 1 1.355 1 3v10c0 1.645 1.355 3 3 3h8c1.645 0 3-1.355 3-3V3c0-1.645-1.355-3-3-3zm0 2h8c.57 0 1 .43 1 1v9c0 .57-.43 1-1 1H4c-.555 0-1-.445-1-1V3c0-.555.445-1 1-1zm4 1C5.79 3 4 4.79 4 7v4h4c2.5 0 4-1.79 4-4s-1.79-4-4-4zm0 2a2 2 0 1 1-2 2 2 2 0 0 1 2-2zm0 0"/></svg> \ No newline at end of file diff --git a/icons/gnome/system-symbolic.svg b/icons/gnome/system-symbolic.svg new file mode 100644 index 00000000..bfbf1bd5 --- /dev/null +++ b/icons/gnome/system-symbolic.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#2e3436" d="M3 0C1.34 0 0 1.34 0 3v7c0 1.66 1.34 3 3 3h10c1.66 0 3-1.34 3-3V3c0-1.66-1.34-3-3-3zm0 2h10c.555 0 1 .445 1 1v7c0 .555-.445 1-1 1H3c-.555 0-1-.445-1-1V3c0-.555.445-1 1-1zm2 12a2 2 0 0 0-2 2h10a2 2 0 0 0-2-2zm0 0"/></svg> \ No newline at end of file diff --git a/icons/gnome/temperature-symbolic.svg b/icons/gnome/temperature-symbolic.svg new file mode 100644 index 00000000..e00a2eba --- /dev/null +++ b/icons/gnome/temperature-symbolic.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#2e3434" d="M8 0C6.338 0 5 1.338 5 3v6c0 .116.007.23.02.342A4 4 0 0 0 4 12a4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-1.018-2.666A3.05 3.05 0 0 0 11 9V3c0-1.662-1.338-3-3-3zm0 2c.554 0 1 .446 1 1v1H8v1h1v1H8v1h1v1H8v1h1v1.27a2 2 0 0 1 .316.23 2 2 0 0 1 .082.082 2 2 0 0 1 .182.203 2 2 0 0 1 .08.117 2 2 0 0 1 .125.215 2 2 0 0 1 .063.135A2 2 0 0 1 10 12a2 2 0 0 1-2 2 2 2 0 0 1-2-2 2 2 0 0 1 .15-.732 2 2 0 0 1 .07-.155 2 2 0 0 1 .12-.205 2 2 0 0 1 .082-.119 2 2 0 0 1 .197-.219 2 2 0 0 1 .06-.06A2 2 0 0 1 7 10.277V3c0-.554.446-1 1-1zm0 9a1 1 0 0 0-1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0-1-1z"/></svg> \ No newline at end of file diff --git a/icons/gnome/voltage-symbolic.svg b/icons/gnome/voltage-symbolic.svg new file mode 100644 index 00000000..1aa22102 --- /dev/null +++ b/icons/gnome/voltage-symbolic.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M4 .004v3H2.977A1.97 1.97 0 0 0 1 4.977v2.05c0 .13.012.254.035.375A4.99 4.99 0 0 0 6 13.004 3.015 3.015 0 0 0 9 16h2c1.094 0 2-.906 2-2h1v2h2v-2c0-1.094-.906-2-2-2h-1c-1.094 0-2 .906-2 2H9c-.563 0-1-.434-1-.996a4.99 4.99 0 0 0 4.965-5.602A1.97 1.97 0 0 0 13 7.027v-2.05a1.97 1.97 0 0 0-1.977-1.973H10v-3H8v3H6v-3Zm0 0" style="stroke:none;fill-rule:nonzero;fill:#2e3434;fill-opacity:1"/></svg> \ No newline at end of file diff --git a/icons/original/battery-symbolic.svg b/icons/original/battery-symbolic.svg new file mode 100644 index 00000000..70df9ee2 --- /dev/null +++ b/icons/original/battery-symbolic.svg @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="16" height="16.001" xmlns="http://www.w3.org/2000/svg"> + <g fill="#474747"> + <path d="M5 5v2h6V5z" overflow="visible"/> + <path d="M5.469 0c-.49 0-.797.216-1.032.456C4.202.696 4 1.012 4 1.486V2H2v14h12V2h-2v-.406l-.002-.028a1.616 1.616 0 0 0-.416-1.011c-.236-.28-.62-.585-1.2-.553L10.438 0zm.53 2h4v2h2v10H4V4h2z" color="#bebebe" font-family="sans-serif" font-weight="400" overflow="visible" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none" white-space="normal"/> + <path d="m5 8v2h6v-2zm0 3v2h6v-2z" overflow="visible"/> + </g> +</svg> diff --git a/icons/cpu-symbolic.svg b/icons/original/cpu-symbolic.svg similarity index 100% rename from icons/cpu-symbolic.svg rename to icons/original/cpu-symbolic.svg diff --git a/icons/fan-symbolic.svg b/icons/original/fan-symbolic.svg similarity index 100% rename from icons/fan-symbolic.svg rename to icons/original/fan-symbolic.svg diff --git a/icons/original/gpu-symbolic.svg b/icons/original/gpu-symbolic.svg new file mode 100644 index 00000000..d5cf1577 --- /dev/null +++ b/icons/original/gpu-symbolic.svg @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"> + <g transform="matrix(3.38015e-16,5.5202,-5.5202,3.38015e-16,526.335,-21.2284)"> + <path d="M18,18L18,8L6,8L6,12L14,12L14,24L6,24L6,41.942L14,41.942L14,50.565L6,50.565L6,68.188L14,68.188L14,84L18,84L18,76L43,76L43,83C43.262,84.981 44.621,85.866 46.73,86L76.27,86C77.384,86 78.257,85.827 78.879,85.369C79.549,84.876 80,84.108 80,83L80,76L84.83,76C88.477,76.314 90.397,75.227 91.886,73.383C93.128,71.845 94.269,69.879 94,66.83L94,18L18,18ZM14,64.188L10,64.188L10,54.565L14,54.565L14,64.188ZM14,37.942L10,37.942L10,28L14,28L14,37.942ZM76,81.05C76,81.783 75.758,82.05 74.84,82.05L48.16,82.05C46.867,82.364 46.769,81.824 47,81.05L47,76L76,76L76,81.05ZM90,65.17C90.472,69.878 88.349,72.291 83.17,72L18,72L18,22L90,22L90,65.17Z" style="fill-rule:nonzero;"/> + </g> + <g transform="matrix(2.90206e-16,4.73942,-4.73942,2.90206e-16,491.213,161.673)"> + <path d="M44,66.88C54.906,66.88 63.88,57.906 63.88,47C63.88,36.094 54.906,27.12 44,27.12C33.094,27.12 24.12,36.094 24.12,47C24.131,57.902 33.098,66.869 44,66.88ZM42,62.74C37.914,62.223 34.185,60.135 31.61,56.92L37.67,52.92C38.832,54.175 40.338,55.062 42,55.47L42,62.74ZM46,62.74L46,55.46C47.653,55.082 49.159,54.227 50.33,53L56.39,57C53.801,60.185 50.074,62.244 46,62.74ZM58.06,39.65C60.332,43.951 60.484,49.072 58.47,53.5L52.34,49.5C52.582,48.689 52.707,47.847 52.71,47C52.712,45.831 52.474,44.673 52.01,43.6L58.06,39.65ZM46,31.26C49.762,31.74 53.23,33.554 55.77,36.37L49.63,40.37C48.581,39.483 47.337,38.856 46,38.54L46,31.26ZM48.71,47C48.71,49.584 46.584,51.71 44,51.71C41.416,51.71 39.29,49.584 39.29,47C39.29,44.416 41.416,42.29 44,42.29C46.582,42.295 48.705,44.418 48.71,47ZM42,31.26L42,38.53C40.664,38.854 39.421,39.484 38.37,40.37L32.23,36.37C34.77,33.554 38.238,31.74 42,31.26ZM36,43.6C35.536,44.673 35.298,45.831 35.3,47C35.304,47.843 35.429,48.682 35.67,49.49L29.53,53.49C27.53,49.059 27.681,43.945 29.94,39.64L36,43.6Z" style="fill-rule:nonzero;"/> + </g> + <g transform="matrix(2.65262e-16,4.33206,-4.33206,2.65262e-16,472.204,-12.7952)"> + <g> + <path d="M44,66.88C54.906,66.88 63.88,57.906 63.88,47C63.88,36.094 54.906,27.12 44,27.12C33.094,27.12 24.12,36.094 24.12,47C24.131,57.902 33.098,66.869 44,66.88ZM42,62.74C37.914,62.223 34.185,60.135 31.61,56.92L37.67,52.92C38.832,54.175 40.338,55.062 42,55.47L42,62.74ZM46,62.74L46,55.46C47.653,55.082 49.159,54.227 50.33,53L56.39,57C53.801,60.185 50.074,62.244 46,62.74ZM58.06,39.65C60.332,43.951 60.484,49.072 58.47,53.5L52.34,49.5C52.582,48.689 52.707,47.847 52.71,47C52.712,45.831 52.474,44.673 52.01,43.6L58.06,39.65ZM46,31.26C49.762,31.74 53.23,33.554 55.77,36.37L49.63,40.37C48.581,39.483 47.337,38.856 46,38.54L46,31.26ZM48.71,47C48.71,49.584 46.584,51.71 44,51.71C41.416,51.71 39.29,49.584 39.29,47C39.29,44.416 41.416,42.29 44,42.29C46.582,42.295 48.705,44.418 48.71,47ZM42,31.26L42,38.53C40.664,38.854 39.421,39.484 38.37,40.37L32.23,36.37C34.77,33.554 38.238,31.74 42,31.26ZM36,43.6C35.536,44.673 35.298,45.831 35.3,47C35.304,47.843 35.429,48.682 35.67,49.49L29.53,53.49C27.53,49.059 27.681,43.945 29.94,39.64L36,43.6Z" style="fill-rule:nonzero;"/> + </g> + </g> +</svg> diff --git a/icons/memory-symbolic.svg b/icons/original/memory-symbolic.svg similarity index 100% rename from icons/memory-symbolic.svg rename to icons/original/memory-symbolic.svg diff --git a/icons/network-download-symbolic.svg b/icons/original/network-download-symbolic.svg similarity index 100% rename from icons/network-download-symbolic.svg rename to icons/original/network-download-symbolic.svg diff --git a/icons/network-symbolic.svg b/icons/original/network-symbolic.svg similarity index 100% rename from icons/network-symbolic.svg rename to icons/original/network-symbolic.svg diff --git a/icons/network-upload-symbolic.svg b/icons/original/network-upload-symbolic.svg similarity index 100% rename from icons/network-upload-symbolic.svg rename to icons/original/network-upload-symbolic.svg diff --git a/icons/storage-symbolic.svg b/icons/original/storage-symbolic.svg similarity index 100% rename from icons/storage-symbolic.svg rename to icons/original/storage-symbolic.svg diff --git a/icons/system-symbolic.svg b/icons/original/system-symbolic.svg similarity index 100% rename from icons/system-symbolic.svg rename to icons/original/system-symbolic.svg diff --git a/icons/temperature-symbolic.svg b/icons/original/temperature-symbolic.svg similarity index 100% rename from icons/temperature-symbolic.svg rename to icons/original/temperature-symbolic.svg diff --git a/icons/voltage-symbolic.svg b/icons/original/voltage-symbolic.svg similarity index 100% rename from icons/voltage-symbolic.svg rename to icons/original/voltage-symbolic.svg diff --git a/metadata.json b/metadata.json index 57213b43..281e63d8 100644 --- a/metadata.json +++ b/metadata.json @@ -1,5 +1,4 @@ { - "_generated": "Generated by SweetTooth, do not edit", "description": "A glimpse into your computer's temperature, voltage, fan speed, memory usage, processor load, system resources, network speed and storage stats. This is a one stop shop to monitor all of your vital sensors. Uses asynchronous polling to provide a smooth user experience. Feature requests or bugs? Please use GitHub.", "gettext-domain": "vitals", "name": "Vitals", @@ -9,5 +8,8 @@ ], "url": "https://github.com/corecoding/Vitals", "uuid": "Vitals@CoreCoding.com", - "version": 64 + "version": 66, + "donations": { + "paypal": "corecoding" + } } diff --git a/prefs.js b/prefs.js index db28afa3..07916bdf 100644 --- a/prefs.js +++ b/prefs.js @@ -62,7 +62,7 @@ const Settings = new GObject.Class({ } // process individual drop down sensor preferences - sensors = [ 'position-in-panel', 'unit', 'network-speed-format', 'memory-measurement', 'storage-measurement', 'battery-slot' ]; + sensors = [ 'position-in-panel', 'unit', 'network-speed-format', 'memory-measurement', 'storage-measurement', 'battery-slot', 'icon-style' ]; for (let key in sensors) { let sensor = sensors[key]; diff --git a/prefs.ui b/prefs.ui index 978d903e..ab07185c 100644 --- a/prefs.ui +++ b/prefs.ui @@ -45,6 +45,7 @@ <child> <object class="GtkSwitch" id="include-public-ip"> <property name="halign">end</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -146,6 +147,7 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Seconds between updates</property> </object> </child> @@ -170,6 +172,7 @@ <object class="GtkListBoxRow"> <property name="width_request">100</property> <property name="selectable">0</property> + <property name="activatable">0</property> <property name="child"> <object class="GtkBox"> <property name="can_focus">0</property> @@ -181,6 +184,7 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Position in panel</property> </object> </child> @@ -217,12 +221,14 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Use higher precision</property> </object> </child> <child> <object class="GtkSwitch" id="use-higher-precision"> <property name="halign">end</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -244,12 +250,14 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Alphabetize sensors</property> </object> </child> <child> <object class="GtkSwitch" id="alphabetize"> <property name="halign">end</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -271,12 +279,14 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Hide zero values</property> </object> </child> <child> <object class="GtkSwitch" id="hide-zeros"> <property name="halign">end</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -298,12 +308,14 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Use fixed widths</property> </object> </child> <child> <object class="GtkSwitch" id="fixed-widths"> <property name="halign">end</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -325,12 +337,14 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Hide icons in top bar</property> </object> </child> <child> <object class="GtkSwitch" id="hide-icons"> <property name="halign">end</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -352,49 +366,55 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Menu always centered</property> </object> </child> <child> <object class="GtkSwitch" id="menu-centered"> <property name="halign">end</property> + <property name="margin-end">5</property> + </object> + </child> + </object> + </property> + </object> + </child> + <child> + <object class="GtkListBoxRow"> + <property name="width_request">100</property> + <property name="selectable">0</property> + <property name="activatable">0</property> + <property name="child"> + <object class="GtkBox"> + <property name="can_focus">0</property> + <property name="margin_top">6</property> + <property name="margin_bottom">6</property> + <child> + <object class="GtkLabel"> + <property name="hexpand">1</property> + <property name="can_focus">0</property> + <property name="halign">start</property> + <property name="margin-start">5</property> + <property name="margin-end">5</property> + <property name="label" translatable="yes">Icon style</property> + </object> + </child> + <child> + <object class="GtkComboBoxText" id="icon-style"> + <property name="can_focus">0</property> + <property name="margin-end">5</property> + <property name="active">0</property> + <items> + <item translatable="yes">Original</item> + <item translatable="yes">GNOME</item> + </items> </object> </child> </object> </property> </object> </child> - </object> - </property> - <child type="label_item"> - <placeholder/> - </child> - </object> - </child> - <child> - <object class="GtkLabel"> - <property name="can_focus">0</property> - <property name="halign">start</property> - <property name="valign">baseline</property> - <property name="label" translatable="yes">About</property> - <attributes> - <attribute name="weight" value="bold"></attribute> - </attributes> - </object> - </child> - <child> - <object class="GtkFrame"> - <property name="can_focus">0</property> - <property name="child"> - <object class="GtkLabel"> - <property name="can_focus">0</property> - <property name="halign">start</property> - <property name="valign">baseline</property> - <property name="margin-start">5</property> - <property name="label" translatable="yes">Feature requests or bugs? Please visit <a href="https://github.com/corecoding/Vitals/issues">GitHub</a>. No warranty, expressed or implied. <a href="https://corecoding.com/donate.php">Donate</a> if you found this useful.</property> - <property name="use_markup">1</property> - <property name="wrap">1</property> - <property name="xalign">0</property> </object> </property> <child type="label_item"> @@ -446,6 +466,7 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Monitor temperature</property> </object> </child> @@ -473,6 +494,7 @@ <object class="GtkSwitch" id="show-temperature"> <property name="halign">end</property> <property name="valign">center</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -497,12 +519,14 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Monitor voltage</property> </object> </child> <child> <object class="GtkSwitch" id="show-voltage"> <property name="halign">end</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -525,12 +549,14 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Monitor fan</property> </object> </child> <child> <object class="GtkSwitch" id="show-fan"> <property name="halign">end</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -553,6 +579,7 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Monitor memory</property> </object> </child> @@ -580,6 +607,7 @@ <object class="GtkSwitch" id="show-memory"> <property name="halign">end</property> <property name="valign">center</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -604,6 +632,7 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Monitor processor</property> </object> </child> @@ -631,6 +660,7 @@ <object class="GtkSwitch" id="show-processor"> <property name="halign">end</property> <property name="valign">center</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -655,6 +685,7 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Monitor system</property> </object> </child> @@ -682,6 +713,7 @@ <object class="GtkSwitch" id="show-system"> <property name="halign">end</property> <property name="valign">center</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -706,6 +738,7 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Monitor network</property> </object> </child> @@ -733,6 +766,7 @@ <object class="GtkSwitch" id="show-network"> <property name="halign">end</property> <property name="valign">center</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -757,6 +791,7 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Monitor storage</property> </object> </child> @@ -784,6 +819,7 @@ <object class="GtkSwitch" id="show-storage"> <property name="halign">end</property> <property name="valign">center</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -808,6 +844,7 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Monitor battery</property> </object> </child> @@ -835,6 +872,7 @@ <object class="GtkSwitch" id="show-battery"> <property name="halign">end</property> <property name="valign">center</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -859,6 +897,7 @@ <property name="can_focus">0</property> <property name="halign">start</property> <property name="margin-start">5</property> + <property name="margin-end">5</property> <property name="label" translatable="yes">Monitor gpu (beta; NVIDIA only)</property> </object> </child> @@ -886,6 +925,7 @@ <object class="GtkSwitch" id="show-gpu"> <property name="halign">end</property> <property name="valign">center</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -905,6 +945,44 @@ </child> </object> </child> + <child> + <object class="GtkLabel"> + <property name="halign">start</property> + <property name="can_focus">0</property> + <property name="margin-start">12</property> + <property name="margin-end">9</property> + <property name="margin_bottom">12</property> + <property name="label" translatable="yes">About</property> + <attributes> + <attribute name="weight" value="bold"></attribute> + </attributes> + </object> + </child> + <child> + <object class="GtkFrame"> + <property name="can_focus">0</property> + <property name="margin-start">6</property> + <property name="margin-end">6</property> + <property name="child"> + <object class="GtkLabel"> + <property name="can_focus">0</property> + <property name="halign">start</property> + <property name="valign">baseline</property> + <property name="margin_top">5</property> + <property name="margin_bottom">5</property> + <property name="margin-start">5</property> + <property name="margin-end">5</property> + <property name="label" translatable="yes">Feature requests or bugs? Please visit <a href="https://github.com/corecoding/Vitals/issues">GitHub</a>. No warranty, expressed or implied. <a href="https://corecoding.com/donate.php">Donate</a> if you found this useful.</property> + <property name="use_markup">1</property> + <property name="wrap">1</property> + <property name="xalign">0</property> + </object> + </property> + <child type="label_item"> + <placeholder/> + </child> + </object> + </child> </object> <object class="GtkBox" id="storage_prefs"> <property name="can_focus">1</property> @@ -1248,6 +1326,7 @@ <child> <object class="GtkSwitch" id="include-static-info"> <property name="halign">end</property> + <property name="margin-end">5</property> </object> </child> </object> @@ -1297,6 +1376,7 @@ <child> <object class="GtkSwitch" id="include-static-gpu-info"> <property name="halign">end</property> + <property name="margin-end">5</property> </object> </child> </object> diff --git a/schemas/gschemas.compiled b/schemas/gschemas.compiled index f608987e..936fdb3a 100644 Binary files a/schemas/gschemas.compiled and b/schemas/gschemas.compiled differ diff --git a/schemas/org.gnome.shell.extensions.vitals.gschema.xml b/schemas/org.gnome.shell.extensions.vitals.gschema.xml index 39310855..7a0decd7 100644 --- a/schemas/org.gnome.shell.extensions.vitals.gschema.xml +++ b/schemas/org.gnome.shell.extensions.vitals.gschema.xml @@ -146,5 +146,10 @@ <summary>Include GPU static information</summary> <description>Display GPU static information that doesn't change</description> </key> + <key type="i" name="icon-style"> + <default>0</default> + <summary>Icon styles</summary> + <description>Set the style for the displayed sensor icons ('original', 'updated')</description> + </key> </schema> </schemalist>