mirror of
https://github.com/kuhyx/scripts.git
synced 2026-07-04 13:03:05 +02:00
feat: shorten icon display
This commit is contained in:
parent
220a2af392
commit
32168d44b7
@ -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"
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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>"
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user