Skip to main content

helper functions for xbar menus

Project description

Python library to make xbar development easy in python

Include this in your file after the regular imports

def install(pkg: str, spec: str = ""):
    try:
        __import__(pkg)
    except ImportError:
        install_args = ["install", "--upgrade", f"--target={Path(__file__).parent}"]
        getattr(__import__("pip"), "main")(install_args + [spec or pkg])
        __import__(pkg)


install("pyxbar")


from pyxbar import (  # noqa: E402
    Config,
    Divider,
    Menu,
    MenuItem,
    Renderable,
    ShellItem,
)


@dataclass
class MyConfig(Config):
    MYVARIABLE: bool = True
    ...

CONFIG = get_config(MyConfig)  # type: ignore
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyxbar-0.2.3.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

pyxbar-0.2.3-py3-none-any.whl (7.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page