No description
This repository has been archived on 2025-03-19. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2024-06-11 16:55:15 -06:00
debian revert meta changes 2024-06-11 16:51:18 -06:00
.gitignore Ignore _build and quilt .pc dirs via .gitignore 2024-06-11 15:04:35 -06:00
.gitlab-ci.yml update runner 2024-06-11 16:55:15 -06:00
go.mod Initial waybar plugin framework for go 2022-08-01 12:19:10 -04:00
go.sum Initial waybar plugin framework for go 2022-08-01 12:19:10 -04:00
LICENSE Initial commit 2022-08-01 12:04:07 -04:00
README.md Initial waybar plugin framework for go 2022-08-01 12:19:10 -04:00
status.go Initial waybar plugin framework for go 2022-08-01 12:19:10 -04:00
status_test.go Initial waybar plugin framework for go 2022-08-01 12:19:10 -04:00
updater.go Initial waybar plugin framework for go 2022-08-01 12:19:10 -04:00
updater_test.go initial debian prep 2024-06-11 15:30:57 -06:00

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
    }
}