Compare commits
No commits in common. "09cfd7d7c1063578a27adceb9220bd6a9496e5ec" and "f9c4fd6acfba40cd28cbc1644cd1d99faac3118c" have entirely different histories.
09cfd7d7c1
...
f9c4fd6acf
3
.gitmodules
vendored
@ -1,3 +0,0 @@
|
||||
[submodule "lolcat"]
|
||||
path = lolcat
|
||||
url = git@github.com:jaseg/lolcat.git
|
1
lolcat
@ -1 +0,0 @@
|
||||
Subproject commit 8173ed8cb62f22ca2ebb33a63b5b9954afb20d7e
|
85
motd.py
@ -1,85 +0,0 @@
|
||||
#!/bin/python
|
||||
|
||||
from functools import cache
|
||||
import os
|
||||
import random
|
||||
#import ueberzug.lib.v0 as ueberzug
|
||||
import subprocess
|
||||
import time
|
||||
import fnmatch
|
||||
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))]))
|
||||
|
||||
#filter waifus
|
||||
waifulist = os.listdir(DIR)
|
||||
waifus_raw = fnmatch.filter(waifulist, '*.256.png')
|
||||
waifus = list(waifus_raw)
|
||||
waifuindex = random.randint(1, len(waifus))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#print(modpath)
|
||||
|
||||
#######################
|
||||
|
||||
#If term Kitty
|
||||
print(len(waifus))
|
||||
|
||||
if random.randint(0,1) == 0:
|
||||
if os.path.getsize(cachefile) != 0:
|
||||
f = open(cachefile, 'r')
|
||||
waifuindex = f.read()
|
||||
print(int(waifuindex))
|
||||
#print(len(waifus))
|
||||
#Else Add File
|
||||
###############
|
||||
if int(waifuindex) < len(waifus):
|
||||
waifu = waifus[int(waifuindex)]
|
||||
waifuindex = int(waifuindex) + 1
|
||||
f = open(cachefile, 'w')
|
||||
f.write(str(waifuindex))
|
||||
else:
|
||||
waifuindex = random.randint(1, len(waifus))
|
||||
f = open(cachefile, 'w')
|
||||
f.write(str(waifuindex))
|
||||
waifu = waifus[int(waifuindex)]
|
||||
else:
|
||||
waifu = waifus[int(waifuindex)]
|
||||
#######################
|
||||
|
||||
#Declare static methods
|
||||
@staticmethod
|
||||
def showImage():
|
||||
subprocess.run(["/usr/bin/kitty", "icat", DIR+"/"+waifu])
|
||||
|
||||
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)
|
||||
|
||||
showImage()
|
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 131 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 156 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 22 KiB |