Skip to content

lack/gowaybarplug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gowaybarplug

Go framework for custom Waybar plugins

Usage

First build a plugin that reports some interesting status:

package main

import (
    "time"

    waybar "github.com/lack/gowaybarplug"
)

main() {
    updater := waybar.NewUpdater()
    for {
        status := waybar.Status{
            Text: "Some text",
            Toolbar: "Other text",
        }
        // Obviously do something more interesting than just static text in the status...
        updater.Status <- &status
        time.Sleep(15 * time.Second)
    }
}

Then add it to your ~/.config/waybar/config:

{
    // ... Other waybar config
    "custom/mything": {
        "format": "{} {icon}",
        "return-type": "json",
        "exec": "/path/to/my/new/plugin"
        // etc
    }
}

About

Go framework for custom waybar plugins

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages