The Barista Logo

barista

An i3status alternative in golang

Download sample-bar Download i3status example View on GitHub

Disk Utilisation

godoc
import "barista.run/modules/diskspace"

Display disk utilisation stats for a path: diskspace.New("/home/me") / diskspace.New("/mnt/sdcard").

Note: The path given to diskspace should be a path on the device (e.g. /mnt/sdcard), and not the path to the block device (e.g. /dev/mmcblk0).

Configuration

Example

144.8 GiB avail

Show the space available on the home folder’s disk:

diskspace.New("/home").Output(func(i diskspace.Info) bar.Output) {
	return outputs.Textf("%s avail", outputs.IBytesize(i.Available))
})

Data: type Info struct

Fields

Methods

Documentation for unit.Datasize