mirror of
https://github.com/kuhyx/scripts.git
synced 2026-07-04 15:03:09 +02:00
fix: font size is constnat no matter the screne size
This commit is contained in:
parent
f9e3dc72eb
commit
a9e1271d95
@ -71,9 +71,9 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Convert speeds to human-readable format
|
# Convert speeds to human-readable format
|
||||||
rx_rate_human=$(numfmt --to=iec --suffix=B/s $total_rx_rate)
|
rx_rate_human=$(numfmt --to=iec --suffix=B/s --padding=8 $total_rx_rate)
|
||||||
tx_rate_human=$(numfmt --to=iec --suffix=B/s $total_tx_rate)
|
tx_rate_human=$(numfmt --to=iec --suffix=B/s --padding=8 $total_tx_rate)
|
||||||
|
|
||||||
# Output the result with fixed width
|
# Store the result of printf into a string and echo it
|
||||||
printf " %-8s %-8s\n" "$rx_rate_human" "$tx_rate_human"
|
printf " %s %s\n" "$rx_rate_human" "$tx_rate_human"
|
||||||
echo "#50FA7B"
|
echo "#50FA7B"
|
||||||
@ -9,8 +9,11 @@ is_ubuntu() {
|
|||||||
set_font_size() {
|
set_font_size() {
|
||||||
resolution=$(xdpyinfo | grep dimensions | awk '{print $2}')
|
resolution=$(xdpyinfo | grep dimensions | awk '{print $2}')
|
||||||
width=$(echo $resolution | cut -d 'x' -f 1)
|
width=$(echo $resolution | cut -d 'x' -f 1)
|
||||||
|
# Do not change this font size, it actually makes i3blocks unbearable to look at:
|
||||||
|
# Icons (like for slack) are too small and i3blocks are too big
|
||||||
|
# Network monitor jumping becomes annoying
|
||||||
if [ "$width" -gt 1920 ]; then
|
if [ "$width" -gt 1920 ]; then
|
||||||
echo "14"
|
echo "8"
|
||||||
else
|
else
|
||||||
echo "8"
|
echo "8"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user