This is a fork of i3blocks that add support for FreeBSD.
i3blocks is a highly flexible status line for the i3 window manager. It handles clicks, signals and language-agnostic user scripts.
The content of each block (e.g. time, battery status, network state, ...) is the output of a command provided by the user. Blocks are updated on click, at a given interval of time or on a given signal, also specified by the user.
It aims to respect the i3bar protocol, providing customization such as text alignment, urgency, color, and more.
Here is an example of status line, showing the time updated every second, the volume updated only when i3blocks receives a SIGRTMIN+10, and click events.
[volume]
label=
command=~/.config/i3/modules/volume
interval=1
signal=1
[time]
command=date '+%H:%M:%S %A: %d:%m:%Y'
interval=1
color=#7070db
[clickme]
full_text=Click me!
command=echo button=$BLOCK_BUTTON x=$BLOCK_X y=$BLOCK_Y
min_width=button=1 x=1366 y=768
align=left
You can use your own scripts, or the ones provided with i3blocks. Feel free to contribute and improve them!
A sample of how can i3blocks look like is here:
The scripts provided by default may use external tools:
acpi
(often provided by a package of the same name) used bybattery
.yad
(often provided by a package of the same name) used bycalendar
.pidof
(often provided by a package of the same name) used bymocp
.freecolor
(often provided by a package of the same name) used bymemory
.Font Awesome
for icons.
For more information about how it works, please refer to the manpage.
You can also take a look at the i3bar protocol to see what possibilities it offers you.
i3blocks may already be packaged for your distribution:
- Archlinux: i3blocks-git AURs.
- Gentoo: ebuild
- Debian: i3blocks and Ubuntu: i3blocks
A FreeBSD port can be found here:
- FreeBSD i3blocks
You may also install i3blocks from source:
$ git clone git://github.com/Minbar1/i3blocks
$ cd i3blocks
$ gmake clean debug # or make clean all
# gmake install
Note: the generation of the manpage in Linux requires the pandoc
utility, packaged in
common distributions as pandoc
.
-
Set your
status_command
in a bar block of your i3 config file:bar { status_command i3blocks -c ~/.config/i3/i3blocks.conf }
-
For customization, copy the default i3blocks.conf into ~/.config/i3/i3blocks.conf (e.g.
cp /usr/local/etc/i3blocks.conf ~/.config/i3/i3blocks.conf
) -
Restart i3 (e.g.
i3-msg restart
)
i3blocks is Copyright (C) 2014 Vivien Didelot
See the file COPYING for information of licensing and distribution.