fixed ip address, added podcast and audiobook menus
This commit is contained in:
parent
545911aead
commit
f3ba755b51
2 changed files with 9 additions and 1 deletions
|
@ -25,6 +25,14 @@ menu_config = [
|
|||
{"plugin": "music",
|
||||
"arg": "playlists"}),
|
||||
]}),
|
||||
MenuItem("Podcasts",
|
||||
MenuType.PLUGIN,
|
||||
{"plugin": "music",
|
||||
"arg": "podcasts"}),
|
||||
MenuItem("Audiobooks",
|
||||
MenuType.PLUGIN,
|
||||
{"plugin": "music",
|
||||
"arg": "audiobooks"}),
|
||||
MenuItem("System",
|
||||
MenuType.SUB_MENU,
|
||||
{"sub_menu": [
|
||||
|
|
|
@ -4,7 +4,7 @@ from graphics import Graphics
|
|||
|
||||
def execute(cinput: ControlInput, graphics: Graphics, _):
|
||||
while True:
|
||||
cmd = "hostname -I | cut -d' ' -f1"
|
||||
cmd = "ip --brief addr show dev wlan0 | awk '{print $3}' | sed -E 's/\/[0-9]+$//'"
|
||||
ip = subprocess.check_output(cmd, shell=True).decode("utf-8")
|
||||
cmd = "top -bn 2 |grep \"Cpu(s)\" | awk '{print $2+$4+$6+$10+$12+$14+$16 \"%\"}' | tail -n1"
|
||||
cpu = subprocess.check_output(cmd, shell=True).decode("utf-8")
|
||||
|
|
Reference in a new issue