barista.run: barista.run Index | Files | Directories

package barista

import "barista.run"

Index

Package Files

barista.go

func Add Uses

func Add(module bar.Module)

Add adds a module to the bar.

func DefaultErrorHandler Uses

func DefaultErrorHandler(e bar.ErrorEvent)

DefaultErrorHandler invokes i3-nagbar to show the full error message.

func Run Uses

func Run(modules ...bar.Module) error

Run sets up all the streams and enters the main loop. If any modules are provided, they are added to the bar now. This allows both styles of bar construction: `bar.Add(a); bar.Add(b); bar.Run()`, and `bar.Run(a, b)`.

func SetErrorHandler Uses

func SetErrorHandler(handler func(bar.ErrorEvent))

SetErrorHandler sets the function to be called when an error segment is right clicked. This replaces the DefaultErrorHandler.

func SuppressSignals Uses

func SuppressSignals(suppressSignals bool)

SuppressSignals instructs the bar to skip the pause/resume signal handling. Must be called before Run.

func TestMode Uses

func TestMode(reader io.Reader, writer io.Writer)

TestMode creates a new instance of the bar for testing purposes, and runs it on the provided streams instead of stdin/stdout.

Directories

PathSynopsis
barPackage bar allows a user to create a go binary that follows the i3bar protocol.
base/clickPackage click provides methods to compose click handlers.
base/notifierPackage notifier provides a channel that can send update notifications.
base/valuePackage value provides atomic values with update notifications.
base/watchers/dbusPackage dbus provides watchers that notify when dbus name owners or object properties change, and infrastructure for testing code that uses them.
base/watchers/filePackage file uses the fsnotify library to watch for changes to files.
base/watchers/localtzPackage localtz watches for changes to the local machine's time zone.
base/watchers/netlinkPackage netlink uses the netlink library to watch for changes in link states.
colorsPackage colors provides helper functions to manage color and color schemes.
corePackage core provides some of the basic barista functionality, enabling more complex constructs without duplicating code or logic.
formatPackage format provides utility methods for formatting units.
groupPackage group provides a module that groups existing modules, and uses a provided Grouper to selectively display output from these modules.
group/collapsingPackage collapsing provides a group that supports expanding/collapsing, and a controller to allow programmatic expansion/collapse.
group/cyclingPackage cycling provides a group that continuously cycles between all modules at a fixed interval.
group/followingPackage following provides a group that always shows the output from the most recently updated module in the set.
group/modalPackage modal provides a group with various "modes", each mode identified by a string key and containing multiple modules.
group/switchingPackage switching provides a group that displays modules one at a time, and a controller to switch to the next/previous/specific module.
loggingPackage logging provides logging functions for use in the bar and modules.
modules/batteryPackage battery provides a battery status i3bar module.
modules/bluetoothPackage bluetooth provides modules for watching the status of Bluetooth adapters and devices.
modules/clockPackage clock displays a clock.
modules/counterPackage counter demonstrates an extremely simple i3bar module that shows a counter which can be chnaged by clicking on it.
modules/cpuloadPackage cpuload implements an i3bar module that shows load averages.
modules/cputempPackage cputemp implements an i3bar module that shows the CPU temperature.
modules/diskioPackage diskio implements an i3bar module to show disk IO rates.
modules/diskspacePackage diskspace provides an i3bar module for disk space usage.
modules/funcsPackage funcs provides the ability to construct i3bar modules from simple Funcs.
modules/githubPackage github provides a barista module to show github notifications.
modules/gsuite/calendarPackage calendar provides a Google Calendar barista module.
modules/gsuite/gmailPackage gmail provides a gmail barista module.
modules/mediaPackage media provides an i3bar module for an MPRIS-compatible media player.
modules/meminfoPackage meminfo provides an i3bar module that shows memory information.
modules/meta/multicastPackage multicast provides a method to convert any bar.Module into one that can be added to the bar multiple times.
modules/meta/reformatPackage reformat provides a module that "wraps" an existing module and transforms it's output.
modules/meta/slotPackage slot provides multiple slots for a single module, allowing it to be moved between various positions on the bar.
modules/meta/splitPackage split provides a module that splits the output from an existing module and sends it to two new modules.
modules/netinfoPackage netinfo provides an i3bar module for network information.
modules/netspeedPackage netspeed provides an i3bar module to display network utilisation.
modules/shellPackage shell provides modules to display the output of shell commands.
modules/staticPackage static provides a simple module that shows static content on the bar, with methods to set the content.
modules/sysinfoPackage sysinfo implements i3bar modules that show system information.
modules/systemdPackage systemd provides modules for watching the status of a systemd unit.
modules/volumePackage volume provides an i3bar module that interfaces with alsa or pulse to display and control the system volume.
modules/volume/alsa
modules/volume/pulseaudio
modules/vpnPackage vpn provides an i3bar module for openvpn information.
modules/weatherPackage weather provides an i3bar module that displays weather info.
modules/weather/darkskyPackage darksky provides weather using the Dark Sky API, available at https://darksky.net/.
modules/weather/metarPackage metar provides weather using the METAR API from the NOAA Aviation Digital Data Service, available at https://www.aviationweather.gov/.
modules/weather/openweathermapPackage openweathermap provides weather using the OpenWeatherMap API, available at https://openweathermap.org/api.
modules/wlanPackage wlan provides an i3bar module for wireless information.
oauthPackage oauth provides oauth capabilities to barista and modules.
outputsPackage outputs provides helper functions to construct bar.Outputs.
pangoPackage pango provides a type-safe way to construct pango markup.
pango/iconsPackage icons provides an interface for using icon fonts in a bar.
pango/icons/fontawesomePackage fontawesome provides support for FontAwesome Icons from https://github.com/FortAwesome/Font-Awesome
pango/icons/materialPackage material provides support for Google's Material Design Icons from https://github.com/google/material-design-icons
pango/icons/mdiPackage mdi provides support for "Material Design Icons" from https://materialdesignicons.com/, a fork and extension of Material.
pango/icons/typiconsPackage typicons provides support for Typicons from https://github.com/stephenhutchings/typicons.font
sinkPackage sink provides functions to create sinks.
testing/barPackage bar provides utilities for testing barista modules using a fake bar instance.
testing/cronPackage cron provides a function to run a test only in Travis CI cron runs, and retry the test with increasing delays a few times before failing the build.
testing/failPackage fail provides methods to test and verify failing assertions.
testing/githubfsPackage githubfs provides an afero FS that's backed by github.com.
testing/httpcachePackage httpcache provides a RoundTripper that stores all responses on disk, and returns cached responses for any requests that have been made before.
testing/httpclientPackage httpclient provides a testable wrapper around an existing *http.Client.
testing/httpserverPackage httpserver provides a test http server that can serve some canned responses, e.g.
testing/mockioPackage mockio provides infinite streams that can be used for testing stdin/stdout.
testing/modulePackage module provides a test module that can be used in tests.
testing/notifierPackage notifier provides assertions that notifier channels (<-chan struct{}) received or did not receive a signal.
testing/outputPackage output provides utilities for testing barista outputs and segments.
testing/pangoPackage pango provides provides a method to test markup equality.
timingPackage timing provides a testable interface for timing and scheduling.

Package barista imports 16 packages (graph) and is imported by 4 packages. Updated 2019-12-13. Refresh now. Tools for package owners.