Skip to content

Platform

A widget to show the current OS platform!

Key
Default
Description
apiThe api object provided within the function
iconTrueWhether to show the icon of the OS or not.
fgtheme.foreground1Color to show the text in, defaults to theme.foreground1 or white based on theme
bgtheme.primaryColor to show the background in, defaults to theme.primary or accent based on theme

TIP

If your system does not have an icon, feel free to open an issue 😄

Usage

python
from dooit_extras.bar_widgets import Platform
from dooit.ui.api.events import subscribe, Startup

@subscribe(Startup)
def setup(api, _):
    api.bar.set( 
        [
            # ....
            Platform(api),
            # ....
        ]
    )