fixed ip address, added podcast and audiobook menus

This commit is contained in:
Rudis Muiznieks 2022-12-27 14:29:05 -06:00
parent 545911aead
commit f3ba755b51
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
2 changed files with 9 additions and 1 deletions

View File

@ -25,6 +25,14 @@ menu_config = [
{"plugin": "music", {"plugin": "music",
"arg": "playlists"}), "arg": "playlists"}),
]}), ]}),
MenuItem("Podcasts",
MenuType.PLUGIN,
{"plugin": "music",
"arg": "podcasts"}),
MenuItem("Audiobooks",
MenuType.PLUGIN,
{"plugin": "music",
"arg": "audiobooks"}),
MenuItem("System", MenuItem("System",
MenuType.SUB_MENU, MenuType.SUB_MENU,
{"sub_menu": [ {"sub_menu": [

View File

@ -4,7 +4,7 @@ from graphics import Graphics
def execute(cinput: ControlInput, graphics: Graphics, _): def execute(cinput: ControlInput, graphics: Graphics, _):
while True: 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") 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" 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") cpu = subprocess.check_output(cmd, shell=True).decode("utf-8")