Platform
A widget to show the current OS platform!
Key | Default | Description |
---|---|---|
api | The api object provided within the function | |
icon | True | Whether to show the icon of the OS or not. |
fg | theme.foreground1 | Color to show the text in, defaults to theme.foreground1 or white based on theme |
bg | theme.primary | Color 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),
# ....
]
)