Commit Graph

15 Commits

Author SHA1 Message Date
Ed Ralston
7abcbe80e5
Prevent segfault in getCpuFrequency
When parseCpuFrequencies returns an empty vector, getCpuFrequency
would attempt to dereference an invalid iterator.

Return early from getCpuFrequency when parseCpuFrequencies returns an
empty vector.

Resolves a segfault when waybar is run within a VM on apple silicon.
2022-05-19 20:01:57 -04:00
Alex
a1129c4c87 fix: bsd 2022-04-06 14:55:08 +02:00
Alex
f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Brent George
3c18c43b9a limit cpu load figure to 2 points 2022-02-22 16:33:33 -07:00
Darkclainer
6e5a0bc80a Add cpu usage for every core 2021-09-19 14:02:25 +03:00
Alex
67c7302938
Revert "Add CPU usage for every core" 2021-09-18 13:50:16 +02:00
Darkclainer
4bf577e89b Add CPU usage for every core 2021-09-17 21:18:21 +03:00
Tobias Bengfort
7b4b5e55a2 support format-icon for cpu und memory 2021-08-23 07:30:19 +02:00
jgmdev
f8f1e791a3 [Module CPU] fix crash due to empty frequencies.
On some systems (eg: ARM) the supported frequencies of the CPU are not
properly reported by /proc/cpuinfo so if that fails try to retrieve them
from /sys/devices/system/cpu/cpufreq/policy[0-9]/cpuinfo_[max|min]_freq.
2021-04-15 14:30:29 -04:00
Alex
600afaf530
Merge pull request #1037 from Moonlight-Angel/cpu-frequency
Add cpu min/max/avg frequencies
2021-03-25 12:09:42 +01:00
Antonin Reitz
a49b12b66b Fix CPU load values 2021-03-12 20:58:51 +01:00
Genesis
99643ba2e6
Stub parseCpuFrequencies on *BSD platforms 2021-02-25 09:14:51 +01:00
Genesis
08ea5ebe1f
Add cpu frequency 2021-02-25 09:14:51 +01:00
Ole Martin Handeland
4229e9b2ca Implemented format-{state} for cpu/disk/memory 2020-10-12 02:05:26 +02:00
Jan Beich
4e567d0483 cpu: port parseCpuinfo to BSDs 2020-05-19 10:43:42 +00:00