46 lines
947 B
Python
Executable File
46 lines
947 B
Python
Executable File
#!/bin/python
|
|
|
|
import os
|
|
import ueberzug.lib.v0 as ueberzug
|
|
import curses
|
|
import time
|
|
from curses.textpad import Textbox, rectangle
|
|
|
|
modpath = os.path.dirname(__file__)
|
|
cachefile = "/tmp/waifu.cache"
|
|
resolution = 256
|
|
center = True
|
|
lolcat = False
|
|
unameArg = "-sr"
|
|
uptimeArg = "--pretty"
|
|
terminal = os.get_terminal_size()
|
|
minTermW = 200
|
|
#unameColor = "\033[1;38;5;93m"
|
|
#uptimeColor = "\033[1;38;5;99m"
|
|
|
|
#print len([name for name in os.listdir(f'{modpath}/waifus') if os.path.isfile(name)])
|
|
DIR=modpath + '/waifus'
|
|
#print(len([name for name in os.listdir(DIR) if os.path.isfile(os.path.join(DIR, name))]))
|
|
|
|
#print(modpath)
|
|
|
|
@staticmethod
|
|
def showImage():
|
|
print("showImage")
|
|
|
|
def showUname(unameArg):
|
|
os.system("/usr/bin/uname " + unameArg)
|
|
|
|
|
|
|
|
def showUptime(uptimeArg):
|
|
os.system("/usr/bin/uptime " + uptimeArg)
|
|
|
|
def doLolcat():
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
showUname(unameArg)
|
|
showUptime(uptimeArg)
|