mirror of
https://github.com/kuhyx/scripts.git
synced 2026-11-22 10:12:21 +01:00
feat: shorten icon display
This commit is contained in:
parent
220a2af392
commit
32168d44b7
@ -4,7 +4,7 @@ acpi -b | awk -F', ' '
|
|||||||
/Battery/ {
|
/Battery/ {
|
||||||
split($2, percent, "%")
|
split($2, percent, "%")
|
||||||
split($3, time, " ")
|
split($3, time, " ")
|
||||||
printf " %d%%", percent[1]
|
printf " %d%%", percent[1]
|
||||||
if (time[1] != "") printf ", %s", time[1]
|
if (time[1] != "") printf ", %s", time[1]
|
||||||
if ($1 ~ /Charging/) printf ", "
|
if ($1 ~ /Charging/) printf ", "
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
|||||||
@ -17,12 +17,12 @@ command=~/.config/i3blocks/motherboard_temp.sh
|
|||||||
interval=5
|
interval=5
|
||||||
|
|
||||||
[memory]
|
[memory]
|
||||||
command=free -h | awk '/^Mem:/ {print "RAM: " $3 "/" $2}' # for RAM
|
command=free -h | awk '/^Mem:/ {print " " $3 "/" $2}' # for RAM
|
||||||
interval=5
|
interval=5
|
||||||
color=#50FA7B
|
color=#50FA7B
|
||||||
|
|
||||||
[disk]
|
[disk]
|
||||||
command=df -h / | awk '/\// {print " Disk: " $3 "/" $2}' # for disk
|
command=df -h / | awk '/\// {print " Disk: " $3 "/" $2}' # for disk
|
||||||
interval=60
|
interval=60
|
||||||
color=#50FA7B
|
color=#50FA7B
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ interval=1
|
|||||||
color=#50FA7B
|
color=#50FA7B
|
||||||
|
|
||||||
[ethernet]
|
[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
|
interval=10
|
||||||
|
|
||||||
[wifi]
|
[wifi]
|
||||||
@ -52,7 +52,7 @@ command=~/.config/i3blocks/network_monitor.sh
|
|||||||
interval=1
|
interval=1
|
||||||
|
|
||||||
[time]
|
[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
|
interval=1
|
||||||
color=#50FA7B
|
color=#50FA7B
|
||||||
|
|
||||||
|
|||||||
@ -45,4 +45,4 @@ if [[ "$cpu_temp" != "N/A" ]]; then
|
|||||||
fi
|
fi
|
||||||
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
|
fi
|
||||||
|
|
||||||
# Output<
|
# 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
|
||||||
echo "#FFFFFF" # Default color for fallback (ignored if markup is enabled)
|
echo "#FFFFFF" # Default color for fallback (ignored if markup is enabled)
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Output the temperature with the color
|
# Output the temperature with the color
|
||||||
echo " MB: ${temp}°C" # is a thermometer icon
|
echo " MB: ${temp}°C" # is a thermometer icon
|
||||||
echo
|
echo
|
||||||
echo $color
|
echo $color
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user