theme

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

package theme provides utilities for customizing the styling of termshark.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(name string, app gowid.IApp) error

Load will set the package-level theme object to a viper object representing the toml file either (a) read from disk, or failing that (b) built-in to termshark. Disk themes are preferred and take precedence.

func MakeColorSafe

func MakeColorSafe(s string, l Layer) (gowid.Color, error)

MakeColorSafe extends gowid's MakeColorSafe function, preferring to interpret its string argument as a toml file config key lookup first; if this fails, then fall back to gowid.MakeColorSafe, which will then read colors as urwid color names, #-prefixed hex digits, grayscales, etc.

Types

type Layer

type Layer int
const (
	Foreground Layer = 0
	Background Layer = iota
)

type Mode

type Mode gowid.ColorMode

func (Mode) String

func (m Mode) String() string

Directories

Path Synopsis
package modeswap provides an IColor-conforming type Color that renders differently if in low-color mode
package modeswap provides an IColor-conforming type Color that renders differently if in low-color mode

Jump to

Keyboard shortcuts

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