From 294192f0caa0f7884e82ee870ed34ffa588a0800 Mon Sep 17 00:00:00 2001 From: Chris Monahan <3803591+corecoding@users.noreply.github.com> Date: Sat, 2 Mar 2024 08:14:21 -0500 Subject: [PATCH 01/16] prep for next version, adds donate link --- metadata.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/metadata.json b/metadata.json index 57213b4..281e63d 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" + } } From f8c06eb8e69ccd79cd447c59ab0e1f920def6c7a Mon Sep 17 00:00:00 2001 From: guilherme Date: Mon, 4 Mar 2024 19:54:50 +0000 Subject: [PATCH 02/16] added icon style combo box to ui --- prefs.js | 2 +- prefs.ui | 33 +++++++++++++++++++ ....gnome.shell.extensions.vitals.gschema.xml | 5 +++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/prefs.js b/prefs.js index db28afa..07916bd 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 978d903..6a3bbfa 100644 --- a/prefs.ui +++ b/prefs.ui @@ -364,6 +364,39 @@ + + + 100 + 0 + + + 0 + 6 + 6 + + + 1 + 0 + start + 5 + Icon style + + + + + 0 + 5 + 0 + + Original + Updated + + + + + + + diff --git a/schemas/org.gnome.shell.extensions.vitals.gschema.xml b/schemas/org.gnome.shell.extensions.vitals.gschema.xml index 3931085..6272868 100644 --- a/schemas/org.gnome.shell.extensions.vitals.gschema.xml +++ b/schemas/org.gnome.shell.extensions.vitals.gschema.xml @@ -126,6 +126,11 @@ Make the menu centered Center the menu to the icon regardless of the position in the panel + + 0 + Icon styles + Set the style for the displayed sensor icons ('original', 'updated') + "gnome-system-monitor" System Monitor command From 25142f5c339188047850fd4d66ce1924a66a2e00 Mon Sep 17 00:00:00 2001 From: guilherme Date: Mon, 4 Mar 2024 19:59:32 +0000 Subject: [PATCH 03/16] combo box business logic & icon themes --- extension.js | 9 +++++++-- icons/{ => original}/battery-symbolic.svg | 0 icons/{ => original}/cpu-symbolic.svg | 0 icons/{ => original}/fan-symbolic.svg | 0 icons/{ => original}/gpu-symbolic.svg | 0 icons/{ => original}/memory-symbolic.svg | 0 .../{ => original}/network-download-symbolic.svg | 0 icons/{ => original}/network-symbolic.svg | 0 icons/{ => original}/network-upload-symbolic.svg | 0 icons/{ => original}/storage-symbolic.svg | 0 icons/{ => original}/system-symbolic.svg | 0 icons/{ => original}/temperature-symbolic.svg | 0 icons/{ => original}/voltage-symbolic.svg | 0 icons/updated/battery-symbolic.svg | 8 ++++++++ icons/updated/cpu-symbolic.svg | 1 + icons/updated/fan-symbolic.svg | 1 + icons/updated/gpu-symbolic.svg | 15 +++++++++++++++ icons/updated/memory-symbolic.svg | 1 + icons/updated/network-download-symbolic.svg | 1 + icons/updated/network-symbolic.svg | 1 + icons/updated/network-upload-symbolic.svg | 1 + icons/updated/storage-symbolic.svg | 1 + icons/updated/system-symbolic.svg | 1 + icons/updated/temperature-symbolic.svg | 1 + icons/updated/voltage-symbolic.svg | 1 + 25 files changed, 40 insertions(+), 2 deletions(-) rename icons/{ => original}/battery-symbolic.svg (100%) rename icons/{ => original}/cpu-symbolic.svg (100%) rename icons/{ => original}/fan-symbolic.svg (100%) rename icons/{ => original}/gpu-symbolic.svg (100%) rename icons/{ => original}/memory-symbolic.svg (100%) rename icons/{ => original}/network-download-symbolic.svg (100%) rename icons/{ => original}/network-symbolic.svg (100%) rename icons/{ => original}/network-upload-symbolic.svg (100%) rename icons/{ => original}/storage-symbolic.svg (100%) rename icons/{ => original}/system-symbolic.svg (100%) rename icons/{ => original}/temperature-symbolic.svg (100%) rename icons/{ => original}/voltage-symbolic.svg (100%) create mode 100644 icons/updated/battery-symbolic.svg create mode 100644 icons/updated/cpu-symbolic.svg create mode 100644 icons/updated/fan-symbolic.svg create mode 100644 icons/updated/gpu-symbolic.svg create mode 100644 icons/updated/memory-symbolic.svg create mode 100644 icons/updated/network-download-symbolic.svg create mode 100644 icons/updated/network-symbolic.svg create mode 100644 icons/updated/network-upload-symbolic.svg create mode 100644 icons/updated/storage-symbolic.svg create mode 100644 icons/updated/system-symbolic.svg create mode 100644 icons/updated/temperature-symbolic.svg create mode 100644 icons/updated/voltage-symbolic.svg diff --git a/extension.js b/extension.js index 69893db..cc88ec5 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/updated/']; + this._warnings = []; this._sensorMenuItems = {}; this._hotLabels = {}; @@ -76,7 +80,7 @@ var VitalsMenuButton = GObject.registerClass({ this._addSettingChangedSignal('position-in-panel', this._positionInPanelChanged.bind(this)); this._addSettingChangedSignal('menu-centered', this._positionInPanelChanged.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' ]; + 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', 'icon-style' ]; for (let setting of Object.values(settings)) this._addSettingChangedSignal(setting, this._redrawMenu.bind(this)); @@ -498,7 +502,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/original/battery-symbolic.svg similarity index 100% rename from icons/battery-symbolic.svg rename to icons/original/battery-symbolic.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/gpu-symbolic.svg b/icons/original/gpu-symbolic.svg similarity index 100% rename from icons/gpu-symbolic.svg rename to icons/original/gpu-symbolic.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/icons/updated/battery-symbolic.svg b/icons/updated/battery-symbolic.svg new file mode 100644 index 0000000..70df9ee --- /dev/null +++ b/icons/updated/battery-symbolic.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/icons/updated/cpu-symbolic.svg b/icons/updated/cpu-symbolic.svg new file mode 100644 index 0000000..86ca8bf --- /dev/null +++ b/icons/updated/cpu-symbolic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/updated/fan-symbolic.svg b/icons/updated/fan-symbolic.svg new file mode 100644 index 0000000..ea2b44f --- /dev/null +++ b/icons/updated/fan-symbolic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/updated/gpu-symbolic.svg b/icons/updated/gpu-symbolic.svg new file mode 100644 index 0000000..d5cf157 --- /dev/null +++ b/icons/updated/gpu-symbolic.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/icons/updated/memory-symbolic.svg b/icons/updated/memory-symbolic.svg new file mode 100644 index 0000000..1946901 --- /dev/null +++ b/icons/updated/memory-symbolic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/updated/network-download-symbolic.svg b/icons/updated/network-download-symbolic.svg new file mode 100644 index 0000000..4fc170b --- /dev/null +++ b/icons/updated/network-download-symbolic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/updated/network-symbolic.svg b/icons/updated/network-symbolic.svg new file mode 100644 index 0000000..2ff9778 --- /dev/null +++ b/icons/updated/network-symbolic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/updated/network-upload-symbolic.svg b/icons/updated/network-upload-symbolic.svg new file mode 100644 index 0000000..0d67f65 --- /dev/null +++ b/icons/updated/network-upload-symbolic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/updated/storage-symbolic.svg b/icons/updated/storage-symbolic.svg new file mode 100644 index 0000000..30d9007 --- /dev/null +++ b/icons/updated/storage-symbolic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/updated/system-symbolic.svg b/icons/updated/system-symbolic.svg new file mode 100644 index 0000000..bfbf1bd --- /dev/null +++ b/icons/updated/system-symbolic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/updated/temperature-symbolic.svg b/icons/updated/temperature-symbolic.svg new file mode 100644 index 0000000..e00a2eb --- /dev/null +++ b/icons/updated/temperature-symbolic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/updated/voltage-symbolic.svg b/icons/updated/voltage-symbolic.svg new file mode 100644 index 0000000..1aa2210 --- /dev/null +++ b/icons/updated/voltage-symbolic.svg @@ -0,0 +1 @@ + \ No newline at end of file From f6c774b48337f0e09fcdf06898db229f0f226043 Mon Sep 17 00:00:00 2001 From: guilherme Date: Mon, 4 Mar 2024 20:12:32 +0000 Subject: [PATCH 04/16] updated schemas --- schemas/gschemas.compiled | Bin 1884 -> 1972 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/schemas/gschemas.compiled b/schemas/gschemas.compiled index f608987ef8d89490f60b21119d6c35b77e7a8c95..936fdb3a506ffb8d2405e995628fbde747e729c0 100644 GIT binary patch literal 1972 zcmZWqUuYaf93C~bHEEh_`p>A<7EvzB+z~1|PRe;k)nKZ)azIzu)Zq z?zxxzEc6pA%IkjcbfK$vm)>3A8?_(D$$WNHoD%22eSJdgI3UCwTq`?ai08#B_;WyK z?OHq0v8tIsMNv(4tV&F%6H}WFtsfZ<7ovK^kr14l>k;<=m|Aek9{Qn)ff9q@J-}XI zAFv-dSmF?vd5n~J0Q}%K9EK(yF7e&@HwKu4%SX(L3Kky+j$U~B$$K$|x&r?c_yypn zM6J-L-VZ+jr$B40(WOs40RK(!Md0el(mDFneef@V7l6t9+8llA-SC&eE5K$=pX$(ti5XtbYf59$0-V_=`UEA@~d6 zMc|M5W3CR=gYZ|uUjVNi-xvltJq&*hH`jp=ZvQexpL!4cAHY8Y-!CoFa+>jQvA==* z!iO$jYWfv?v!x%5&!Y5MrNw_r> z1ojB_6rTSIa38>P&pyH)z@D)SV2@xAVm$0E>>)gU>_x*s5Vn*Io9JJ-aToG+K^m*G zGD!F?PUp|~N$)<;RvNTFof$7yvCg_)Zt#vLJkvF(qZetv<&DKKyj~Hrju-nK&l5vO zj)|&oiq(qO%XJu!G`1TRwPbzEXk@H>gN=z*+1i;KpT`=7)|qU^Ejq$&wJf5Lk<_;D Zqul5J`KW^Pu%7$q=2fN{9PZ1p{{VT+hkyV8 literal 1884 zcmZ8hO^6&t7_AuBth<@)Wb>oZL=z;^qx6hRG$x1;ki~!=7BnG<(DcmIPFL*iYP+iU z&nOEfpyEOBB4}7|21Jb)l?dWRl8cao#Ogp z`d&UB<|<6BsGf(xCra(zS9u%2SDJqvBy((^I4VwouWb}!XonDY@EqF&L%b?ZfZqgk z-fQ+!oyew%WE?l;oRz6jIyKE1Wy9ETx)9#uB@ceNCO$jB5H#_?Iy?xyxk3$0i~)6E zE3gefSYjuzYaJei-VHoffouP^Yv~l<<6iC;GvWq#1@JZn%k-&-;bTw?0Z(1}>U;Xs zqwwqCSAg^HM=SKHAA%o&6X4cIzwD$>y$${%_zdvtyYG!MZ`4EZKLP&$Twj{F!uiyj z;a>t@2L4z&dzn5p{j1=AfIo}LpXpPNz`p^$3H-Nkz{O8pgFlQU)_`{ot{&!m>aFni zg7*VKt=um)_xlX^IpAac;TxP!&HWw$PXf!WlgH>&)1Lw>;O|s^L!Wv({6+8wzzdxx zJ^IvK_e=0Opnra-d49;dQS5Wy)h}>9HTUI#ec;=d?zHGrbKOJW7lH0Xd!9Zu{iEP1 z;QIb-gg!OniNFakSzMf@PtANTg3kcUuRZZPeQNrjfzJYOA6^}&PdyI*JoqP|IQ_ZH z1GTFc_;;YTI@aKPYS#TK_!@EH$1mtpbN&kWHn3;u*;V?~^y|1oJAi$spMRP@bsfG3 z_JL1t{X0dUdJFs`;7Q=n*Ebb?YF8I9?`Dyz!5tT#YM4mR`qN>$L3r&(q^)moJ#}t^ zL?$|)4+<0ZWFP`FZ>&s$SclzUB7qU4($4DqEkB)bP=9EIP^LK~H{T4)?C*Em|PakSPNN2_ccEg?)hv{vTxzKQkP zu5f9wFRODz?)Sfl*`8@c3UMvST%+w^y+o#k-;pW4A-h$0^!xE;MLWh0R3?PWk4qNz z)8B{tUna_pCmPw+x!*~;E_A=lnqT=YgnrsgCS}*3)_D>RLPy-0Hp-$sB4vm@m2nl8 z>%kZw$A26R!T!u1HwodqUq4g1wRba0|em$R5bPJqoaAvIp(~9s$?~*$>$( z*(Y&K+{6C49dKDw9rSG4$WIt&QP`GNEl9WTBI|}$`c@^>NqFRb&lnnN0ARo6x?y0T7H@z=e; ty${ZNbvS6P)wL=NO+0Hpj(sNc&|>BP`B| Date: Mon, 4 Mar 2024 20:27:05 +0000 Subject: [PATCH 05/16] added margins to prefs switches --- prefs.ui | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/prefs.ui b/prefs.ui index 6a3bbfa..97b64aa 100644 --- a/prefs.ui +++ b/prefs.ui @@ -45,6 +45,7 @@ end + 5 @@ -146,6 +147,7 @@ 0 start 5 + 5 Seconds between updates @@ -181,6 +183,7 @@ 0 start 5 + 5 Position in panel @@ -217,12 +220,14 @@ 0 start 5 + 5 Use higher precision end + 5 @@ -244,12 +249,14 @@ 0 start 5 + 5 Alphabetize sensors end + 5 @@ -271,12 +278,14 @@ 0 start 5 + 5 Hide zero values end + 5 @@ -298,12 +307,14 @@ 0 start 5 + 5 Use fixed widths end + 5 @@ -325,12 +336,14 @@ 0 start 5 + 5 Hide icons in top bar end + 5 @@ -352,12 +365,14 @@ 0 start 5 + 5 Menu always centered end + 5 @@ -379,6 +394,7 @@ 0 start 5 + 5 Icon style @@ -479,6 +495,7 @@ 0 start 5 + 5 Monitor temperature @@ -506,6 +523,7 @@ end center + 5 @@ -530,12 +548,14 @@ 0 start 5 + 5 Monitor voltage end + 5 @@ -558,12 +578,14 @@ 0 start 5 + 5 Monitor fan end + 5 @@ -586,6 +608,7 @@ 0 start 5 + 5 Monitor memory @@ -613,6 +636,7 @@ end center + 5 @@ -637,6 +661,7 @@ 0 start 5 + 5 Monitor processor @@ -664,6 +689,7 @@ end center + 5 @@ -688,6 +714,7 @@ 0 start 5 + 5 Monitor system @@ -715,6 +742,7 @@ end center + 5 @@ -739,6 +767,7 @@ 0 start 5 + 5 Monitor network @@ -766,6 +795,7 @@ end center + 5 @@ -790,6 +820,7 @@ 0 start 5 + 5 Monitor storage @@ -817,6 +848,7 @@ end center + 5 @@ -841,6 +873,7 @@ 0 start 5 + 5 Monitor battery @@ -868,6 +901,7 @@ end center + 5 @@ -892,6 +926,7 @@ 0 start 5 + 5 Monitor gpu (beta; NVIDIA only) @@ -919,6 +954,7 @@ end center + 5 @@ -1281,6 +1317,7 @@ end + 5 @@ -1330,6 +1367,7 @@ end + 5 From d36a77925dc8e36b53e64f5070cb2743d09747dc Mon Sep 17 00:00:00 2001 From: guilherme Date: Tue, 5 Mar 2024 09:21:06 +0000 Subject: [PATCH 06/16] updated 'about' section position due to the newly addition of the 'icon style' combo box the symmetry on the 'about' section got broken, this commit fixes this issue by having a dedicated row to the 'about' section --- prefs.ui | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/prefs.ui b/prefs.ui index 97b64aa..e3a287b 100644 --- a/prefs.ui +++ b/prefs.ui @@ -420,7 +420,7 @@ - + + @@ -974,6 +974,45 @@ + + + start + 0 + 12 + 9 + + 12 + About + + + + + + + + 0 + 6 + 6 + + + 0 + start + baseline + 5 + 5 + 5 + 5 + 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. + 1 + 1 + 0 + + + + + + + 1 From d5b79da9a24a3e84f6f317167b0050b5ca4ad200 Mon Sep 17 00:00:00 2001 From: guilherme Date: Tue, 5 Mar 2024 09:25:36 +0000 Subject: [PATCH 07/16] removed commented ui lines --- prefs.ui | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/prefs.ui b/prefs.ui index e3a287b..c9a2710 100644 --- a/prefs.ui +++ b/prefs.ui @@ -420,37 +420,6 @@ - - @@ -980,7 +949,6 @@ 0 12 9 - 12 About From 8713be251dd90961df9beaffcb7912278b243043 Mon Sep 17 00:00:00 2001 From: guilherme Date: Tue, 5 Mar 2024 09:45:53 +0000 Subject: [PATCH 08/16] updated 'Icons' section on README.md included credits for the new icon theme --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f3ebbb..cf307ee 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). +### Updated 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. From 69e468e675865f7e444b1f5983e1dcbd632493c1 Mon Sep 17 00:00:00 2001 From: guilherme Date: Tue, 5 Mar 2024 11:32:52 +0000 Subject: [PATCH 09/16] added icon update to details menu --- extension.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/extension.js b/extension.js index cc88ec5..d9a4cbe 100644 --- a/extension.js +++ b/extension.js @@ -79,8 +79,9 @@ 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', 'icon-style' ]; + 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)) this._addSettingChangedSignal(setting, this._redrawMenu.bind(this)); @@ -309,6 +310,21 @@ 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)); + } + } + + _iconStyleChanged() { + this._redrawDetailsMenuIcons(); + this._redrawMenu(); + } + _removeHotLabel(key) { if (key in this._hotLabels) { let label = this._hotLabels[key]; From e20b2c02a6956d041f3c50f6ab22422abc08964e Mon Sep 17 00:00:00 2001 From: guilherme Date: Tue, 5 Mar 2024 14:14:44 +0000 Subject: [PATCH 10/16] support for gpu icon --- extension.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extension.js b/extension.js index d9a4cbe..7b8a193 100644 --- a/extension.js +++ b/extension.js @@ -318,6 +318,12 @@ var VitalsMenuButton = GObject.registerClass({ 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() { From f8ecdf4795a96a076d3435dbec682433aef616c6 Mon Sep 17 00:00:00 2001 From: guilherme Date: Tue, 5 Mar 2024 16:01:17 +0000 Subject: [PATCH 11/16] changed theme name from 'updated' to 'gnome' --- extension.js | 2 +- icons/{updated => gnome}/battery-symbolic.svg | 0 icons/{updated => gnome}/cpu-symbolic.svg | 0 icons/{updated => gnome}/fan-symbolic.svg | 0 icons/{updated => gnome}/gpu-symbolic.svg | 0 icons/{updated => gnome}/memory-symbolic.svg | 0 icons/{updated => gnome}/network-download-symbolic.svg | 0 icons/{updated => gnome}/network-symbolic.svg | 0 icons/{updated => gnome}/network-upload-symbolic.svg | 0 icons/{updated => gnome}/storage-symbolic.svg | 0 icons/{updated => gnome}/system-symbolic.svg | 0 icons/{updated => gnome}/temperature-symbolic.svg | 0 icons/{updated => gnome}/voltage-symbolic.svg | 0 prefs.ui | 2 +- 14 files changed, 2 insertions(+), 2 deletions(-) rename icons/{updated => gnome}/battery-symbolic.svg (100%) rename icons/{updated => gnome}/cpu-symbolic.svg (100%) rename icons/{updated => gnome}/fan-symbolic.svg (100%) rename icons/{updated => gnome}/gpu-symbolic.svg (100%) rename icons/{updated => gnome}/memory-symbolic.svg (100%) rename icons/{updated => gnome}/network-download-symbolic.svg (100%) rename icons/{updated => gnome}/network-symbolic.svg (100%) rename icons/{updated => gnome}/network-upload-symbolic.svg (100%) rename icons/{updated => gnome}/storage-symbolic.svg (100%) rename icons/{updated => gnome}/system-symbolic.svg (100%) rename icons/{updated => gnome}/temperature-symbolic.svg (100%) rename icons/{updated => gnome}/voltage-symbolic.svg (100%) diff --git a/extension.js b/extension.js index 7b8a193..63b50c5 100644 --- a/extension.js +++ b/extension.js @@ -46,7 +46,7 @@ var VitalsMenuButton = GObject.registerClass({ // 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/updated/']; + this._sensorsIconPathPrefix = ['/icons/original/', '/icons/gnome/']; this._warnings = []; this._sensorMenuItems = {}; diff --git a/icons/updated/battery-symbolic.svg b/icons/gnome/battery-symbolic.svg similarity index 100% rename from icons/updated/battery-symbolic.svg rename to icons/gnome/battery-symbolic.svg diff --git a/icons/updated/cpu-symbolic.svg b/icons/gnome/cpu-symbolic.svg similarity index 100% rename from icons/updated/cpu-symbolic.svg rename to icons/gnome/cpu-symbolic.svg diff --git a/icons/updated/fan-symbolic.svg b/icons/gnome/fan-symbolic.svg similarity index 100% rename from icons/updated/fan-symbolic.svg rename to icons/gnome/fan-symbolic.svg diff --git a/icons/updated/gpu-symbolic.svg b/icons/gnome/gpu-symbolic.svg similarity index 100% rename from icons/updated/gpu-symbolic.svg rename to icons/gnome/gpu-symbolic.svg diff --git a/icons/updated/memory-symbolic.svg b/icons/gnome/memory-symbolic.svg similarity index 100% rename from icons/updated/memory-symbolic.svg rename to icons/gnome/memory-symbolic.svg diff --git a/icons/updated/network-download-symbolic.svg b/icons/gnome/network-download-symbolic.svg similarity index 100% rename from icons/updated/network-download-symbolic.svg rename to icons/gnome/network-download-symbolic.svg diff --git a/icons/updated/network-symbolic.svg b/icons/gnome/network-symbolic.svg similarity index 100% rename from icons/updated/network-symbolic.svg rename to icons/gnome/network-symbolic.svg diff --git a/icons/updated/network-upload-symbolic.svg b/icons/gnome/network-upload-symbolic.svg similarity index 100% rename from icons/updated/network-upload-symbolic.svg rename to icons/gnome/network-upload-symbolic.svg diff --git a/icons/updated/storage-symbolic.svg b/icons/gnome/storage-symbolic.svg similarity index 100% rename from icons/updated/storage-symbolic.svg rename to icons/gnome/storage-symbolic.svg diff --git a/icons/updated/system-symbolic.svg b/icons/gnome/system-symbolic.svg similarity index 100% rename from icons/updated/system-symbolic.svg rename to icons/gnome/system-symbolic.svg diff --git a/icons/updated/temperature-symbolic.svg b/icons/gnome/temperature-symbolic.svg similarity index 100% rename from icons/updated/temperature-symbolic.svg rename to icons/gnome/temperature-symbolic.svg diff --git a/icons/updated/voltage-symbolic.svg b/icons/gnome/voltage-symbolic.svg similarity index 100% rename from icons/updated/voltage-symbolic.svg rename to icons/gnome/voltage-symbolic.svg diff --git a/prefs.ui b/prefs.ui index c9a2710..11d07cd 100644 --- a/prefs.ui +++ b/prefs.ui @@ -405,7 +405,7 @@ 0 Original - Updated + Gnome From 073661d78389aa9c0ee6bae7d6443fa85907609a Mon Sep 17 00:00:00 2001 From: guilherme Date: Tue, 5 Mar 2024 16:04:40 +0000 Subject: [PATCH 12/16] updated theme name in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cf307ee..16888e1 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ 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). -### Updated Theme +### 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. From c49f18475b064989385ce5306ea55316e3010a43 Mon Sep 17 00:00:00 2001 From: guilherme Date: Wed, 6 Mar 2024 00:13:39 +0000 Subject: [PATCH 13/16] capitalized theme title 'Gnome' -> 'GNOME' --- README.md | 2 +- prefs.ui | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 16888e1..65f01d8 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ 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 +### 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. diff --git a/prefs.ui b/prefs.ui index 11d07cd..e254fb9 100644 --- a/prefs.ui +++ b/prefs.ui @@ -405,7 +405,7 @@ 0 Original - Gnome + GNOME From 6b366b5287f3f804f810a526d5b81ab5a9cc1fd9 Mon Sep 17 00:00:00 2001 From: Chris Monahan <3803591+corecoding@users.noreply.github.com> Date: Fri, 8 Mar 2024 13:00:47 -0500 Subject: [PATCH 14/16] fix alignment for G46 --- extension.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension.js b/extension.js index 69893db..3959e68 100644 --- a/extension.js +++ b/extension.js @@ -291,7 +291,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 From eb206fb29af64c87156b3cd7f51dfaa52cf5309d Mon Sep 17 00:00:00 2001 From: Chris Monahan Date: Fri, 8 Mar 2024 12:55:16 -0600 Subject: [PATCH 15/16] move icon-style to end --- schemas/org.gnome.shell.extensions.vitals.gschema.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/schemas/org.gnome.shell.extensions.vitals.gschema.xml b/schemas/org.gnome.shell.extensions.vitals.gschema.xml index 6272868..7a0decd 100644 --- a/schemas/org.gnome.shell.extensions.vitals.gschema.xml +++ b/schemas/org.gnome.shell.extensions.vitals.gschema.xml @@ -126,11 +126,6 @@ Make the menu centered Center the menu to the icon regardless of the position in the panel - - 0 - Icon styles - Set the style for the displayed sensor icons ('original', 'updated') - "gnome-system-monitor" System Monitor command @@ -151,5 +146,10 @@ Include GPU static information Display GPU static information that doesn't change + + 0 + Icon styles + Set the style for the displayed sensor icons ('original', 'updated') + From 29ebca7d3f17b39d4acbeb80cfe102ad1b6c3f15 Mon Sep 17 00:00:00 2001 From: Chris Monahan Date: Fri, 8 Mar 2024 12:56:40 -0600 Subject: [PATCH 16/16] don't leave gtk row highlighted --- prefs.ui | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prefs.ui b/prefs.ui index e254fb9..ab07185 100644 --- a/prefs.ui +++ b/prefs.ui @@ -172,6 +172,7 @@ 100 0 + 0 0 @@ -383,6 +384,7 @@ 100 0 + 0 0