From 98a69a96ba1ed038ba74bf31a96983706603881f Mon Sep 17 00:00:00 2001 From: KRZYSZTOF RUDNICKI Date: Mon, 18 Nov 2024 08:16:27 +0100 Subject: [PATCH] feat: smaller icons, make it work on Ubuntu --- i3/config | 2 +- i3blocks/battery_status.sh | 2 +- i3blocks/config | 4 ++-- i3blocks/motherboard_temp.sh | 2 +- i3blocks/network_monitor.sh | 2 +- i3blocks/wifi_monitor.sh | 2 +- install.sh | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/i3/config b/i3/config index 286c700..b7c710e 100644 --- a/i3/config +++ b/i3/config @@ -13,7 +13,7 @@ set $mod Mod4 # Font for window titles. Will also be used by the bar unless a different font # 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 # text rendering and scalability on retina/hidpi displays (thanks to pango). diff --git a/i3blocks/battery_status.sh b/i3blocks/battery_status.sh index 9926d95..bba1a05 100755 --- a/i3blocks/battery_status.sh +++ b/i3blocks/battery_status.sh @@ -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" diff --git a/i3blocks/config b/i3blocks/config index e7a9d0d..852a68c 100644 --- a/i3blocks/config +++ b/i3blocks/config @@ -17,12 +17,12 @@ command=~/.config/i3blocks/motherboard_temp.sh interval=5 [memory] -command=free -h | awk '/^Mem:/ {print " " $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 " " $3 "/" $2}' #  for disk interval=60 color=#50FA7B diff --git a/i3blocks/motherboard_temp.sh b/i3blocks/motherboard_temp.sh index 4f78416..ca0531f 100755 --- a/i3blocks/motherboard_temp.sh +++ b/i3blocks/motherboard_temp.sh @@ -21,7 +21,7 @@ else fi # Output the temperature with the color -echo " ${temp}°C" #  is a thermometer icon +echo " ${temp}°C" #  is a thermometer icon echo echo $color diff --git a/i3blocks/network_monitor.sh b/i3blocks/network_monitor.sh index 9639ef0..cc947ba 100755 --- a/i3blocks/network_monitor.sh +++ b/i3blocks/network_monitor.sh @@ -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) # 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" \ No newline at end of file diff --git a/i3blocks/wifi_monitor.sh b/i3blocks/wifi_monitor.sh index 412e415..c58d2b8 100755 --- a/i3blocks/wifi_monitor.sh +++ b/i3blocks/wifi_monitor.sh @@ -20,5 +20,5 @@ signal=$(echo "$wifi_info" | awk '/Signal level/ {print $4}' | tr -d 'level=') if [ -z "$ssid" ]; then echo " down" else - echo " $ssid ($signal dBm)" + echo " $ssid ($signal dBm)" fi \ No newline at end of file diff --git a/install.sh b/install.sh index ae8147b..d20715b 100755 --- a/install.sh +++ b/install.sh @@ -19,7 +19,7 @@ fi if is_ubuntu; then 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 yes | sudo pacman -S --needed ttf-dejavu noto-fonts ttf-font-awesome bc jq iw fi