Documentation ¶
Index ¶
- Variables
- func Alert(title string, text string)
- func BuildUrl(u *url.URL, paths ...string) string
- func CopyToClipboard(text string) error
- func GetCache(slug string, name string, maxAge time.Duration) ([]byte, bool, error)
- func GetData(slug string, name string) string
- func GetJson(u string, i interface{}) error
- func GetJsonWithHeaders(u string, i interface{}, headers map[string]string) error
- func GetLastRun(slug string) string
- func GetOutput(slug string) (string, error)
- func GetOutputFollow(slug string) error
- func IsACConnected() bool
- func ListDirectories(opath string) ([]string, error)
- func ListFiles(opath string) ([]string, error)
- func ListFilesRecurse(opath string) ([]string, error)
- func Notify(title string, text string)
- func OpenEditor(fname string) error
- func PasteFromClipboard() (string, error)
- func SaveData(slug string, name string, data string) error
- func SaveLastRun(slug string)
- func SetCache(slug string, name string, data []byte) error
- func Wofi(prompt string, items []string, args ...string) (string, int64, error)
- func WofiConfirm(prompt string) bool
- func WofiInput(prompt string, items []string, args ...string) (string, int64, error)
- func WriteOutput(slug string, data string) error
- type Module
- type WaybarOutput
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Caller().Logger()
Functions ¶
func CopyToClipboard ¶
func GetJsonWithHeaders ¶
func GetLastRun ¶
func GetOutputFollow ¶
func IsACConnected ¶
func IsACConnected() bool
func ListDirectories ¶
func ListFilesRecurse ¶
func OpenEditor ¶
func PasteFromClipboard ¶
func SaveLastRun ¶
func SaveLastRun(slug string)
func WofiConfirm ¶
func WriteOutput ¶
Types ¶
type Module ¶
type Module interface { GetName() string GetDescription() string GetSlug() string GetWaybarOutput() (*WaybarOutput, error) SaveLastRun() GetLastRun() string WriteOutput() error Run() error GetRunInterval() int64 GetRunIntervalOnBattery() int64 RunCommand(name string, args []string) error IsEnabled() bool SuspendOnBattery() bool }
type WaybarOutput ¶
type WaybarOutput struct { Text string `json:"text"` Alt string `json:"alt,omitempty"` Class string `json:"class,omitempty"` Tooltip string `json:"tooltip,omitempty"` }
func (*WaybarOutput) ToJSON ¶
func (w *WaybarOutput) ToJSON() string
Click to show internal directories.
Click to hide internal directories.