feat: shorten icon display

This commit is contained in:
Krzysztof Rudnicki 2024-11-16 21:10:48 +01:00
parent 220a2af392
commit 32168d44b7
5 changed files with 8 additions and 8 deletions

View File

@ -4,7 +4,7 @@ acpi -b | awk -F', ' '
/Battery/ {
split($2, percent, "%")
split($3, time, " ")
printf " %d%%", percent[1]
printf " %d%%", percent[1]
if (time[1] != "") printf ", %s", time[1]
if ($1 ~ /Charging/) printf ", "
printf "\n"

View File

@ -17,12 +17,12 @@ command=~/.config/i3blocks/motherboard_temp.sh
interval=5
[memory]
command=free -h | awk '/^Mem:/ {print "RAM: " $3 "/" $2}' #  for RAM
command=free -h | awk '/^Mem:/ {print " " $3 "/" $2}' #  for RAM
interval=5
color=#50FA7B
[disk]
command=df -h / | awk '/\// {print " Disk: " $3 "/" $2}' #  for disk
command=df -h / | awk '/\// {print " Disk: " $3 "/" $2}' #  for disk
interval=60
color=#50FA7B
@ -40,7 +40,7 @@ interval=1
color=#50FA7B
[ethernet]
command=ip -o -4 addr show enp6s0 | awk '{print " "$4}' || echo " down" #  for Ethernet
command=ip -o -4 addr show enp6s0 | awk '{print " "$4}' || echo " down" #  for Ethernet
interval=10
[wifi]
@ -52,7 +52,7 @@ command=~/.config/i3blocks/network_monitor.sh
interval=1
[time]
command=echo " $(date '+%Y-%m-%d %H:%M')" #  for time (Font Awesome icon)
command=echo " $(date '+%Y-%m-%d %H:%M')" #  for time (Font Awesome icon)
interval=1
color=#50FA7B

View File

@ -45,4 +45,4 @@ if [[ "$cpu_temp" != "N/A" ]]; then
fi
fi
echo -e "<span color=\"$cpu_color\"> ${cpu_temp}°C, ${cpu_load}</span>"
echo -e "<span color=\"$cpu_color\"> ${cpu_temp}°C, ${cpu_load}</span>"

View File

@ -59,7 +59,7 @@ else
fi
# Output<
echo -e "<span color=\"$gpu_color\"> ${gpu_temp}, ${gpu_load}%</span>"
echo -e "<span color=\"$gpu_color\"> ${gpu_temp}, ${gpu_load}%</span>"
echo
echo "#FFFFFF" # Default color for fallback (ignored if markup is enabled)

View File

@ -21,7 +21,7 @@ else
fi
# Output the temperature with the color
echo " MB: ${temp}°C" #  is a thermometer icon
echo "MB: ${temp}°C" #  is a thermometer icon
echo
echo $color