mirror of
https://github.com/kuhyx/scripts.git
synced 2026-07-04 15:23:11 +02:00
feat: smaller icons, make it work on Ubuntu
This commit is contained in:
parent
1fe4b6f1f5
commit
98a69a96ba
@ -13,7 +13,7 @@ set $mod Mod4
|
|||||||
|
|
||||||
# Font for window titles. Will also be used by the bar unless a different font
|
# Font for window titles. Will also be used by the bar unless a different font
|
||||||
# is used in the bar {} block below.
|
# is used in the bar {} block below.
|
||||||
font pango:monospace 8
|
font pango:System San Francisco Display, FontAwesome 8
|
||||||
|
|
||||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||||
|
|||||||
@ -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 " " $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 " " $3 "/" $2}' # for disk
|
||||||
interval=60
|
interval=60
|
||||||
color=#50FA7B
|
color=#50FA7B
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Output the temperature with the color
|
# Output the temperature with the color
|
||||||
echo " ${temp}°C" # is a thermometer icon
|
echo " ${temp}°C" # is a thermometer icon
|
||||||
echo
|
echo
|
||||||
echo $color
|
echo $color
|
||||||
|
|
||||||
|
|||||||
@ -75,5 +75,5 @@ rx_rate_human=$(numfmt --to=iec --suffix=B/s $total_rx_rate)
|
|||||||
tx_rate_human=$(numfmt --to=iec --suffix=B/s $total_tx_rate)
|
tx_rate_human=$(numfmt --to=iec --suffix=B/s $total_tx_rate)
|
||||||
|
|
||||||
# Output the result with fixed width
|
# Output the result with fixed width
|
||||||
printf " %-7s %-7s\n" "$rx_rate_human" "$tx_rate_human"
|
printf " %-8s %-8s\n" "$rx_rate_human" "$tx_rate_human"
|
||||||
echo "#50FA7B"
|
echo "#50FA7B"
|
||||||
@ -20,5 +20,5 @@ signal=$(echo "$wifi_info" | awk '/Signal level/ {print $4}' | tr -d 'level=')
|
|||||||
if [ -z "$ssid" ]; then
|
if [ -z "$ssid" ]; then
|
||||||
echo " down"
|
echo " down"
|
||||||
else
|
else
|
||||||
echo " $ssid ($signal dBm)"
|
echo " $ssid ($signal dBm)"
|
||||||
fi
|
fi
|
||||||
@ -19,7 +19,7 @@ fi
|
|||||||
|
|
||||||
if is_ubuntu; then
|
if is_ubuntu; then
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y fonts-dejavu-core fonts-noto ttf-font-awesome bc jq iw
|
sudo apt-get install -y fonts-dejavu-core fonts-noto fonts-font-awesome bc jq iw
|
||||||
else
|
else
|
||||||
yes | sudo pacman -S --needed ttf-dejavu noto-fonts ttf-font-awesome bc jq iw
|
yes | sudo pacman -S --needed ttf-dejavu noto-fonts ttf-font-awesome bc jq iw
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user