diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2021-05-04 14:41:50 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2021-05-04 14:41:50 +0200 |
| commit | ccc26ed97f5b4953153454df53e619b6911434bb (patch) | |
| tree | f4fe7a313b91a605bb08e9a57305e139718272af | |
| parent | 4df75bbdddee9424f6051597931dc36a81ee2573 (diff) | |
| download | dotfiles-ccc26ed97f5b4953153454df53e619b6911434bb.tar.gz dotfiles-ccc26ed97f5b4953153454df53e619b6911434bb.zip | |
[sway/conky] use CPU total if not exactly 4 cores are available
| -rw-r--r-- | config/sway/conkyrc.json | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/config/sway/conkyrc.json b/config/sway/conkyrc.json index f3b2de0..32d3801 100644 --- a/config/sway/conkyrc.json +++ b/config/sway/conkyrc.json @@ -18,18 +18,23 @@ conky.text = [[ {"name": "cpuStart", "color" : "\#ffffff", "full_text": "CPU:", "separator": false}, - {"name": "cpu1", "color": ${if_match ${cpu cpu1}<89}"\#ffffff"${else}"\#ff0000"${endif}, - "full_text": "${cpu cpu1}%,", "separator": false}, + ${if_match "${exec nproc}"=="4"} + {"name": "cpu1", "color": ${if_match ${cpu cpu1}<89}"\#ffffff"${else}"\#ff0000"${endif}, + "full_text": "${cpu cpu1}%,", "separator": false}, - {"name": "cpu2", "color": ${if_match ${cpu cpu2}<89}"\#ffffff"${else}"\#ff0000"${endif}, + {"name": "cpu2", "color": ${if_match ${cpu cpu2}<89}"\#ffffff"${else}"\#ff0000"${endif}, - "full_text": "${cpu cpu2}%,", "separator": false}, + "full_text": "${cpu cpu2}%,", "separator": false}, - {"name": "cpu3", "color": ${if_match ${cpu cpu3}<89}"\#ffffff"${else}"\#ff0000"${endif}, - "full_text": "${cpu cpu3}%,", "separator": false}, + {"name": "cpu3", "color": ${if_match ${cpu cpu3}<89}"\#ffffff"${else}"\#ff0000"${endif}, + "full_text": "${cpu cpu3}%,", "separator": false}, - {"name": "cpu4", "color": ${if_match ${cpu cpu4}<89}"\#ffffff"${else}"\#ff0000"${endif}, - "full_text": "${cpu cpu4}%"}, + {"name": "cpu4", "color": ${if_match ${cpu cpu4}<89}"\#ffffff"${else}"\#ff0000"${endif}, + "full_text": "${cpu cpu4}%"}, + ${else} + {"name": "cpu", "color": ${if_match ${cpu cpu0}<89}"\#ffffff"${else}"\#ff0000"${endif}, + "full_text": "${cpu cpu0}%"}, + ${endif} ################ memory ######################### |
