Documentation ¶
Overview ¶
Package modules provides functions meant to be used in package config. Every function must accept a single string argument and return a string.
Index ¶
- func BatPerc(b string) string
- func BatState(b string) string
- func BatTime(b string) string
- func CPUFreq(_ string) string
- func CPUPerc(_ string) string
- func Cat(p string) string
- func Date(f string) string
- func DirFiles(d string) string
- func DiskFree(m string) string
- func DiskPerc(m string) string
- func DiskTotal(m string) string
- func DiskUsed(m string) string
- func Entropy(_ string) string
- func Hostname(_ string) string
- func Ipv4(i string) string
- func Ipv6(i string) string
- func Kernel(_ string) string
- func LoadAvg(_ string) string
- func Music(_ string) string
- func NetName(i string) string
- func NetReceive(i string) string
- func NetTransfer(i string) string
- func RAMFree(_ string) string
- func RAMPerc(_ string) string
- func RAMTotal(_ string) string
- func RAMUsed(_ string) string
- func Shell(c string) string
- func SwapFree(_ string) string
- func SwapPerc(_ string) string
- func SwapTotal(_ string) string
- func SwapUsed(_ string) string
- func Temp(p string) string
- func Uptime(_ string) string
- func UserGID(_ string) string
- func UserUID(_ string) string
- func Username(_ string) string
- func WifiPerc(i string) string
- type Fcall
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CPUPerc ¶
CPUPerc returns CPU used percentage since CPUPerc last ran.
Do not run CPUPerc more than once.
func Cat ¶
Cat returns first line of the file in path p.
Ex: /sys/class/backlight/intel_backlight/brightness
func Date ¶
Date returns current date formatted according to f.
Run go doc time.Format for other formats.
Ex: Jan 2 2006 (Mon) 3:04 PM
func NetReceive ¶
NetReceive returns bytes received in interface i since NetReceive last ran.
Do not run this function more than once.
Ex: wlan0
func NetTransfer ¶
NetTransfer returns bytes transferred in interface i since NetTransfer ran.
Do not run this function more than once.
Ex: wlan0
func Shell ¶
Shell executes command c prefixed with 'sh -c'.
Ex: brightnessctl -m | awk 'BEGIN { FS = "," }; 1 { print $4; exit }