mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-21 00:49:52 +01:00
fix: style of cpu stats
This commit is contained in:
@@ -7,23 +7,8 @@
|
||||
#
|
||||
# Official repository for community contributed blocklets:
|
||||
# https://github.com/vivien/i3blocks-contrib
|
||||
|
||||
# List of valid properties:
|
||||
#
|
||||
# align
|
||||
# color
|
||||
# command
|
||||
# full_text
|
||||
# instance
|
||||
# interval
|
||||
# label
|
||||
# min_width
|
||||
# name
|
||||
# separator
|
||||
# separator_block_width
|
||||
# short_text
|
||||
# signal
|
||||
# urgent
|
||||
# NOTE: every command's ouput should end with a newline character (\n), otherwise the block may not be displayed correctly.
|
||||
|
||||
# Global properties
|
||||
# The top properties below are applied to every block, but can be overridden.
|
||||
@@ -80,8 +65,8 @@ border_bottom=0
|
||||
border_left=0
|
||||
|
||||
|
||||
[cpu_usage]
|
||||
command=(mpstat 1 1 | grep Average | awk '{ printf "%04.1f<span color=\"#ff5555\">%</span>", (100 - $12) }') && (sensors | grep 'Package id 0:\|Tdie' | grep ':[ ]*+[0-9]*.[0-9]*°C' -o | grep '+[0-9]*.[0-9]*°C' -o)
|
||||
[cpu_stats]
|
||||
command=(mpstat 1 1 | grep Average | awk '{ printf "%04.1f<span color=\"#ff5555\">%</span>", (100 - $12) }') && (sensors | grep 'Package id 0:\|Tdie' | grep ':[ ]*+[0-9]*.[0-9]*' -o | awk '{ printf "%s<span color=\"#ff5555\">°C</span>\n", $2 }')
|
||||
interval=2
|
||||
label=<span color="#ff5555"><b>CPU: </b></span>
|
||||
border=#ff5555
|
||||
@@ -90,15 +75,6 @@ border_right=0
|
||||
border_bottom=0
|
||||
border_left=0
|
||||
|
||||
[cpu_temperture]
|
||||
command=
|
||||
interval=5
|
||||
border=#ff5555
|
||||
border_top=1
|
||||
border_right=0
|
||||
border_bottom=0
|
||||
border_left=0
|
||||
|
||||
|
||||
[nvidia_gpu_stats]
|
||||
command=nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits | awk '{ printf "%02i<span color=\"#ffb86c\">%</span>", $0}' && nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits | awk '{ printf " %i<span color=\"#ffb86c\">°C</span>\n", $0}'
|
||||
|
||||
Reference in New Issue
Block a user