This is my default i3blocks configuration.
Start of by installing i3blocks. Ideally istallation should be performed with your package manager.
Recommended font: noto-fonts-emoji. All you need to do is install the font, i3 should recognice it and use it automatically.
From the repository root, invoke ./install.sh
. This script will copy the configuration to your home directory. Caution: if you already have a i3blocks configuration setup in ~/.config/i3blocks you might want to back it up first. Also note that i3blocks is not the same software as i3status/i3bar and such will not modify them. If you haven't used i3blocks before you can proceed without worrying.
~/.config/i3/config:
bar {
position top # Position should be 'bottom' or 'top'.
status_command i3blocks # Invoke i3blocks.
# Possible other bar configurations go here...
# ...
}
You could also modify the font and font size in this file. The default font pango will do just fine but you might want to increese the font size based on your needs and also switch to monospace (pango:monospace).
# 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 12
Another good monospace bold font, ttf-hack:
font pango:Hack Bold 16
The sound level indicator is updated once every tenth second. If you want a more responsive sound level indicator you can use pkill -RTMIN+1 i3blocks
to send a signal on sound level changes. This will update the sound level blocklet instantly. Here is an example of how this could be accomplished.
~/.config/i3/config:
# User-added function keys:
bindsym XF86AudioMute exec --no-startup-id pamixer -t && pkill -RTMIN+1 i3blocks
bindsym XF86AudioLowerVolume exec --no-startup-id pamixer -d 3 && pkill -RTMIN+1 i3blocks
bindsym XF86AudioRaiseVolume exec --no-startup-id pamixer -i 3 && pkill -RTMIN+1 i3blocks
It is easy to modify the bar. Take a look at .config/i3blocks/config and see for yourself how easy it is to modify any of the blocklets. If any blocklet is malfunctioning, this should be the entypoint for bug searching.
If you want to modify the weather location data, take a look into config/i3blocks/weather/weather.py (line 9). This too is easy to modify, just change the YR.no XML weblink. To get desired XML weblink, go to the YR webpage and find a location. Add /forecast.xml to the end of the URL (english YR version only) to get the appropriate weblink for the weather script.
Software | Arch Linux Package | Gentoo Package |
---|---|---|
i3blocks | community/i3blocks | x11-misc/i3blocks |
Noto Color Emoji | extra/noto-fonts-emoji | media-fonts/noto-emoji |
ACPI | community/acpi | sys-power/acpid |
Sysstat | community/sysstat | app-admin/sysstat |
Python 3 | extra/python | >=dev-lang/python-3.6 |
Python Requests | extra/python-requests | dev-python/requests |
lm_sensors | extra/lm_sensors | sys-apps/lm-sensors |
Note: Gentoo users need to emerge media-libs/freetype with USE=png for Noto Color Emoji to render.