fixed ip address, added podcast and audiobook menus
This commit is contained in:
parent
545911aead
commit
f3ba755b51
|
@ -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": [
|
||||||
|
|
|
@ -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")
|
||||||
|
|
Reference in New Issue