Skip to main content

i3blocks

/etc/i3blocks.conf

# Global properties
separator=true
separator_block_width=15

[battery]
command=/home/hxd/projects/i3blocks-widgets/target/debug/battery
interval=30
signal=1
markup=pango

[battery-refresh]
command=acpi_listen | while read F; do pkill -SIGRTMIN+1 i3blocks; done
interval=persist

[wifi]
command=/home/hxd/projects/i3blocks-widgets/target/debug/wifi
interval=30
markup=pango
signal=2

[wifi-refresh]
command=dbus-monitor "interface=org.freedesktop.portal.NetworkMonitor" | while read F; do pkill -SIGRTMIN+2 i3blocks; done
interval=persist

[cpu]
command=/home/hxd/projects/i3blocks-widgets/target/debug/cpu
interval=persist
markup=pango

[mem]
command=free -g | tail +2 | tr "\n" ' ' | awk '{print " " $7 "Gi " $11 "Gi"}'
interval=4

[disk]
command=df -hH / /boot/ | tail +2 | tr "\n" ' ' | awk '{print " " $4 " " $10}'
interval=60

[mullvad]
command=echo -n " "; curl -s https://am.i.mullvad.net/json | jq '[.city , .ip] | join("  ")' -r
interval=30

[time]
command=echo " <span color='#19f5af'>`date '+%a %Y-%m-%d %H:%M:%S'`</span>  `date --utc '+%H:%M'`"
markup=pango
interval=1

[greetings]
command=echo " <span color='#f5af19'>$USER</span>"
interval=once
markup=pango