feat: more sp[ace between icon and text, disable network monitor untillfigure out how to handle its bar changes

This commit is contained in:
Krzysztof Rudnicki 2024-11-18 08:45:20 +01:00
parent 98a69a96ba
commit f9e3dc72eb
6 changed files with 42 additions and 16 deletions

View File

@ -1,55 +1,66 @@
[global]
separator=false
markup=pango
[cpu_monitor] [cpu_monitor]
command=~/.config/i3blocks/cpu_monitor.sh command=~/.config/i3blocks/cpu_monitor.sh
interval=5 interval=5
markup=pango markup=pango
[gpu_monitor] [gpu_monitor]
command=~/.config/i3blocks/gpu_monitor.sh command=~/.config/i3blocks/gpu_monitor.sh
interval=5 interval=5
markup=pango markup=pango
[motherboard_temperature] [motherboard_temperature]
command=~/.config/i3blocks/motherboard_temp.sh 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 " " $3 "/" $2}' #  for disk command=df -h / | awk '/\// {print " " $3 "/" $2}' #  for disk
interval=60 interval=60
color=#50FA7B color=#50FA7B
[volume] [volume]
command=~/.config/i3blocks/volume.sh command=~/.config/i3blocks/volume.sh
interval=1 interval=1
[bluetooth] [bluetooth]
command=~/.config/i3blocks/bluetooth.sh command=~/.config/i3blocks/bluetooth.sh
interval=5 interval=5
color=#FFFFFF
[battery] [battery]
command=~/.config/i3blocks/battery_status.sh command=~/.config/i3blocks/battery_status.sh
interval=1 interval=1
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
color=#FFFFFF
[wifi] [wifi]
command=~/.config/i3blocks/wifi_monitor.sh command=~/.config/i3blocks/wifi_monitor.sh
interval=10 interval=10
color=#FFFFFF
#[network_monitor]
#command=~/.config/i3blocks/network_monitor.sh
#interval=1
#color=#FFFFFF
[network_monitor]
command=~/.config/i3blocks/network_monitor.sh
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)

View File

@ -5,6 +5,17 @@ is_ubuntu() {
[ -f /etc/os-release ] && grep -qi 'ubuntu' /etc/os-release [ -f /etc/os-release ] && grep -qi 'ubuntu' /etc/os-release
} }
# Function to detect screen resolution and set font size
set_font_size() {
resolution=$(xdpyinfo | grep dimensions | awk '{print $2}')
width=$(echo $resolution | cut -d 'x' -f 1)
if [ "$width" -gt 1920 ]; then
echo "14"
else
echo "8"
fi
}
# Check if Intel GPU is detected # Check if Intel GPU is detected
if lspci | grep -i 'vga' | grep -i 'intel'; then if lspci | grep -i 'vga' | grep -i 'intel'; then
if is_ubuntu; then if is_ubuntu; then
@ -24,6 +35,10 @@ 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
# Set font size based on screen resolution
font_size=$(set_font_size)
cp -r i3blocks ~/.config/ cp -r i3blocks ~/.config/
cp -r i3 ~/.config/ cp -r i3 ~/.config/
sed -i "s/font pango:System San Francisco Display, FontAwesome [0-9]*/font pango:System San Francisco Display, FontAwesome $font_size/" ~/.config/i3/config
i3-msg reload i3-msg reload