emblemcounter

package
v0.0.0-...-6789dc4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: GPL-3.0, GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package emblemcounter can present notifications as a counter on an emblem on an item in the launcher.

Index

Constants

This section is empty.

Variables

View Source
var BusAddress = bus.Address{
	Interface: "com.lomiri.Shell.Launcher.Item",
	Path:      "/com/lomiri/Shell/Launcher",
	Name:      "com.lomiri.Shell.Launcher",
}

emblemcounter works by setting properties on a well-known dbus name.

Functions

This section is empty.

Types

type EmblemCounter

type EmblemCounter struct {
	// contains filtered or unexported fields
}

EmblemCounter is a little tool that fiddles with the Lomiri launcher to put emblems with counters on launcher icons.

func New

func New(endp bus.Endpoint, log logger.Logger) *EmblemCounter

Build an EmblemCounter using the given bus and log.

func (*EmblemCounter) Present

func (ctr *EmblemCounter) Present(app *click.AppId, nid string, notification *launch_helper.Notification) bool

Look for an EmblemCounter section in a Notification and, if present, presents it to the user.

func (*EmblemCounter) SetCounter

func (ctr *EmblemCounter) SetCounter(app *click.AppId, count int32, visible bool) bool

SetCounter sets an emblem counter on the launcher for app to count (if visible is true), or clears it (if count is 0 or visible is false).

Jump to

Keyboard shortcuts

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