eyes

package
v0.0.0-...-d45d7a1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2023 License: ISC Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const EYE = "" // U+f06e

EYE is a unicode eye

View Source
const MaxEyes = 5

MaxEyes is the max number of eyes allowed in the waybar applet

Variables

This section is empty.

Functions

This section is empty.

Types

type Eyes

type Eyes struct {
	Text    string `json:"text"`
	Tooltip string `json:"tooltip"`
	Class   string `json:"class"`
	Count   int    `json:"count"`
	Faces   int    `json:"faces"`
	Debug   bool   `json:"-"`
}

Eyes struct

func New

func New(debug bool) Eyes

New eyes

func (*Eyes) GetJSONOutput

func (eyes *Eyes) GetJSONOutput() []byte

GetJSONOutput return the waybar json struct

func (*Eyes) PrepareWaybarOutput

func (eyes *Eyes) PrepareWaybarOutput()

PrepareWaybarOutput prepare the class and text for waybar output

func (*Eyes) Reset

func (eyes *Eyes) Reset()

Reset reset the eyes counter

func (*Eyes) SignalHandler

func (eyes *Eyes) SignalHandler()

SignalHandler manage signal SIGUSR1 for Reset()

func (*Eyes) WriteJSONOutput

func (eyes *Eyes) WriteJSONOutput(output []byte) error

WriteJSONOutput write the output as file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL