-
Notifications
You must be signed in to change notification settings - Fork 228
Home
bumblebee-status creates status lines for the i3 window manager. It follows the i3bar protocol.
Please note: So far, it this tool has only been tested on a single laptop using Fedora 24, so I'd be very grateful to hear any experiences and get some bug reports or feature requests :)
- Ease of use: No configuration files, etc. Simply clone and put into your i3 configuration and you are good to go (hopefully...)
- Theming support: What I was missing most in other solutions (although there are some excellent ones out there, such as i3blocks) was the possibility to easily change the look of the i3bar. For bumblebee-status, colors, icons, etc. are defined via a JSON-formatted theme file that is easy to extend and change.
- Modularity: Adding new modules (functionality) should be straight forward
$ git clone git://github.com/tobi-wan-kenobi/bumblebee-status
Please have a look at Available Modules to see which bumblebee-status modules require which Python modules. In general, if you do not use an bumblebee-status module, you don't need its dependencies.
The full list of required Python modules is (modules from the Python Standard Library have been excluded):
- psutil
- netifaces
Some of the modules rather uglish-ly parse the output of standard Linux commands to get their information. Those are:
- dnf for the DNF module
- pactl for the PulseAudio modules
Open your i3wm configuration and modify the status_command for your i3bar like this:
bar {
status_command <path to bumblebee-status/bumblebee-status> -m <list of modules> -p <parameters> -t <theme>
}
Parameters generally are of the format <module name>.<parameter name>
, for example: time.format="%X"
In the same way, it is also possible to specify parameters that are not tied to a specific module. Right now, there is only one such parameter, the update interval:
bar {
status_command <path to bumblebee-status/bumblebee-status> -m <list of modules> -p interval=<update interval in seconds> <other parameters> -t <theme>
}
You can retrieve a list of modules (and their parameters) and themes by entering:
$ cd bumblebee-status
$ ./bumblebee-status -l themes
$ ./bumblebee-status -l modules
Starting with v1.9.1, bumblebee-status also supports "pango" markup in the module output. To make use of that, simply specify the "--markup pango" parameter when starting bumblebee-status (bumblebee-status --markup pango -m <list of modules>
If you want to use a module multiple times, you can assign an "alias" to it (mostly so that you can differentiate it in any on-click events). To do so, simply append :<alias>
to the module name. If you do that, any parameter that you provide has to use the alias instead of the module name.
For troubleshooting, you can write a debug log by providing the -d
or --debug
flag:
$ ./bumblebee-status -d -m <modules>
This will create a file called debug.log
in the same directory as the bumblebee-status
executable.
As a simple example, this is what my i3 configuration looks like:
bar {
font pango:Inconsolata 10
position top
tray_output none
status_command ~/.i3/bumblebee-status/bumblebee-status -m nic disk:home load cpu memory battery date time pasink pasource dnf -p interval=2.5 time.format="%H:%M CW %V" date.format="%a, %b %d %Y" home.path=/home -t solarized-powerline
}
Restart i3wm and - that's it!
By default, the following events are handled:
- Mouse-Wheel on any module moves to the next/previous i3 workspace
- Left-click on the "disk" module opens the specified path in nautilus
- Left-click on either "memory" or "cpu" opens gnome-system-monitor
- Left-click on a "pulseaudio" (or pasource/pasink) module toggles the mute state
- Right-click on a "pulseaudio" module opens pavucontrol
- Mouse-Wheel up/down on a "pulseaudio" module raises/lowers the volume
By default, the Mouse-Wheel wraps for the current output. You can disable this behavior by providing the parameter engine.workspacewrap=false
(starting with version 1.4.5). Also, you can completely disable output switching by using engine.workspacewheel=false
.
You can provide your own handlers to any module by using the following "special" configuration parameters:
- left-click
- right-click
- middle-click
- wheel-up
- wheel-down
For example, to execute "pavucontrol" whenever you left-click on the nic module, you could write:
$ bumblebee-status -p nic.left-click="pavucontrol"
In the string, you can use the following format identifiers:
- name
- instance
- button
For example:
$ bumblebee-status -p disk.left-click="nautilus {instance}"
Here are some screenshots for all themes that currently exist (please note that for the "Powerline" themes, you need to select a font that supports the Powerline icons - see Powerline Fonts):
Solarized Powerline (-t solarized-powerline
):
Gruvbox Powerline (-t gruvbox-powerline
):
Solarized (-t solarized
):
Powerline (-t powerline
):
Default (nothing or -t default
):
usage: bumblebee-status [-h] [-m MODULES [MODULES ...]] [-t THEME]
[--markup MARKUP] [--iconmarkup ICONMARKUP]
[-p PARAMETERS [PARAMETERS ...]] [-l {modules,themes}]
[--list-format {plain,markdown}] [-d] [-r]
[-f LOGFILE] [-i ICONSET] [-a AUTOHIDE [AUTOHIDE ...]]
display system data in the i3bar
optional arguments:
-h, --help show this help message and exit
-m MODULES [MODULES ...], --modules MODULES [MODULES ...]
Specify a space-separated list of modules to load. The
order of the list determines their order in the i3bar
(from left to right). Use <module>:<alias> to provide
an alias in case you want to load the same module
multiple times, but specify different parameters.
-t THEME, --theme THEME
Specify the theme to use for drawing modules
--markup MARKUP Specify the markup type of the output (e.g. 'pango')
--iconmarkup ICONMARKUP
A Python format string that is valid Pango markup used
for low level customization of icons on top of themes.
There is no validation performed, this is delegated to
the user. Used together with --markup=pango. Example:
"<span foreground='#ffffff'
background='#000000'>{}</span>". WARNING: highly
experimental feature
-p PARAMETERS [PARAMETERS ...], --parameters PARAMETERS [PARAMETERS ...]
Provide configuration parameters in the form of
<module>.<key>=<value>
-l {modules,themes}, --list {modules,themes}
Display a list of either available themes or available
modules along with their parameters.
--list-format {plain,markdown}
output format of -l, *must* be specified before -l
-d, --debug Enable debug log, This will create '~/bumblebee-
status-debug.log' by default, can be changed with the
'-f' option
-r, --right-to-left Draw widgets from right to left, rather than left to
right (which is the default)
-f LOGFILE, --logfile LOGFILE
Location of the debug log file
-i ICONSET, --iconset ICONSET
Specify the name of an iconset to use (overrides theme
default)
-a AUTOHIDE [AUTOHIDE ...], --autohide AUTOHIDE [AUTOHIDE ...]
Specify a list of modules to hide when not in
warning/error state
- If you want to write your own module: How to write a module - Contributions are of course highly welcome an appreciated!
- If you want to write your own theme: How to write a theme
If bumblebee-status doesn't work for you, I'd be grateful to hear why. Having said that, if you are searching for tools for the i3bar, here's some I found really great:
- i3blocks: I really like the modular concept and the flexibility in providing custom commands & clickable events (something still on the roadmap for bumblebee-status ;) )
- py3status: I used py3status for a really long time, really useful!
- i3bar with conky: Intriguing approach
Thanks a lot for reading until here, I hope you find this tool useful!