aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2021-05-04 14:41:50 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2021-05-04 14:41:50 +0200
commitccc26ed97f5b4953153454df53e619b6911434bb (patch)
treef4fe7a313b91a605bb08e9a57305e139718272af /config
parent4df75bbdddee9424f6051597931dc36a81ee2573 (diff)
downloaddotfiles-ccc26ed97f5b4953153454df53e619b6911434bb.tar.gz
dotfiles-ccc26ed97f5b4953153454df53e619b6911434bb.zip
[sway/conky] use CPU total if not exactly 4 cores are available
Diffstat (limited to 'config')
-rw-r--r--config/sway/conkyrc.json21
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 #########################