appicons

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package appicons is the application icon table shared across bar components (wayle-shell-core's bar/icons.rs). Order matters: the first matching pattern wins.

Index

Constants

This section is empty.

Variables

View Source
var Default = []Entry{}/* 210 elements not displayed */

Default is DEFAULT_APP_ICON_MAP, verbatim and in order.

Functions

func Lookup

func Lookup(name string) (string, bool)

Lookup is icons.rs lookup_app_icon: the first Default pattern that matches the name, both lowercased (an exact match counts too, as matches_glob's shortcut does). Callers pass app ids, window classes, or player identities alike.

func Resolve

func Resolve(w Window, userMap map[string]string, fallback string) string

Resolve is the sway/niri/mango helpers.rs resolve_app_icon: title-prefixed user patterns against the title first, then app- or un-prefixed user patterns against the app id, then the Default table, then fallback. User patterns are tried in sorted key order (the BTreeMap order). Matching is glob.Wildcard: case-sensitive.

Types

type Entry

type Entry struct {
	Pattern string
	Icon    string
}

Entry is one pattern -> icon pair.

type Window

type Window struct {
	AppID    string
	Title    string
	HasAppID bool
	HasTitle bool
}

Window is what the resolver reads off a compositor window. The Has flags distinguish an unset field from an empty one, as the Rust Option does.

Jump to

Keyboard shortcuts

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