This repository has been archived on 2022-12-29. You can view files and clone it, but cannot push or open issues or pull requests.
zeropod/menu.py

23 lines
472 B
Python
Raw Normal View History

from enum import Enum, auto
from dataclasses import dataclass
class MenuType(Enum):
SUB_MENU = auto()
EXEC_CMD = auto()
EXEC_PLUGIN = auto()
@dataclass
class MenuItem:
display: str
menu_type: MenuType
Menu = [
MenuItem("df -h",
MenuType.EXEC_CMD),
MenuItem("Chess",
MenuType.EXEC_PLUGIN),
MenuItem("Reboot",
MenuType.EXEC_CMD),
MenuItem("Shutdown",
MenuType.EXEC_CMD)]