23 lines
472 B
Python
23 lines
472 B
Python
|
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)]
|