For details about the library modules for configuring your Taffybar, see the full documentation.
taffybar
package documentation -System.Taffybar
gi-gtk
package documentation -GI.Gtk
Taffybar uses the directory $XDG_CONFIG_HOME/taffybar/
. As per the
XDG Base Directory Specification, an unset or empty
XDG_CONFIG_HOME
environment variable is taken to mean ~/.config
.
Be aware that the TaffybarConfig
value required by dyreTaffybar
/startTaffybar
is normally constructed via a SimpleConfig
value and toTaffybarConfig
.
#308 Add styling tips section to README/docs
Appearance of Taffybar widgets can be controlled with CSS rules. These
are by default loaded from $XDG_CONFIG_HOME/taffybar/taffybar.css
.
CSS styling is a feature of GTK. It uses a limited version of CSS, so the following articles from the GTK documentation are useful:
Run Taffybar with the environment variable GTK_DEBUG=interactive
to
enable the GTK Inspector. This will let you figure out
CSS class names of widgets. The GTK Inspector also lets you
interactively try CSS rules, which is immensely helpful.
Taffybar watches taffybar.css
(and other configured CSS files) for
modification, so style changes should be visible immediately.
But, if the file watching doesn't work for some reason, and Taffybar
is running as a daemon, a SIGHUP
signal on the process will force it
to reload the CSS files.
Note that the first three parameters of rgba()
are integers in the
range 0—255, but the fourth is a float in the range 0.0—1.0. For example:
.taffy-box {
background-color: rgba(255, 250, 205, 0.3);
}
Use System.Taffybar.Util.widgetSetClassGI
to add
a CSS class to a widget in your Taffybar config.
This can be used for example to apply different styling to widgets of the same type.