Created
May 31, 2020 13:14
-
-
Save javadr/08c05020389d7604db8882fd0df77fe6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#import os | |
import psutil | |
#from subprocess import PIPE | |
temp = psutil.sensors_temperatures()['acpitz'][0].current | |
print( f"{psutil.virtual_memory()[2]} {temp} C° {psutil.cpu_percent(interval=1)} %| iconName=gnome-dev-memory ") | |
print("---") | |
print( f"Mem. Use : {psutil.virtual_memory()[2]} | bash=gnome-system-monitor terminal=false" ) | |
print( f"Cpu Usage: {psutil.cpu_percent(interval=3)} % | bash=gnome-system-monitor terminal=false" ) | |
print( f"Temperature : {temp} C° | bash=gnome-system-monitor terminal=false" ) | |
#print("---") | |
#if "$ARGOS_MENU_OPEN" == "true" : | |
# # http://stackoverflow.com/a/14853319 | |
## TOP_OUTPUT=$(top -b -n 1 | head -n 20 | awk 1 ORS="\\\\n") | |
# p = psutil.Popen(["/usr/bin/bash", "", '$(top -b -n 1 | head -n 20 | awk 1 ORS="\\\\n")'], stdout=PIPE) | |
# TOP_OUTPUT = p.communicate() | |
# print( "{TOP_OUTPUT} | font=monospace bash=top" ) | |
#else: | |
# print( "Loading..." ) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment