Lots of colours!

This commit is contained in:
Maxwell 2024-07-29 13:09:44 +10:00
parent ebb7114c27
commit 06ed635c21

11
main.py
View File

@ -1,7 +1,7 @@
#!/usr/bin/python3
version = "0.2.0"
# Imports, of course.
# You'll need to install colorama from Pip if you want to use colours in the terminal. I'm probably going to replace this when I get around to making a config file properly.
import os
import socket
import subprocess
@ -10,7 +10,6 @@ from datetime import datetime
from os.path import expanduser
# Some initial variables
version = "0.2.0"
user = os.getlogin()
initDirectory = expanduser("~")
argList = ["", ""]
@ -79,6 +78,12 @@ for word in confArgList:
colourCodes.append('\033[32m')
elif word == 'yellow':
colourCodes.append('\033[33m')
elif word == 'pink':
colourCodes.append('\033[13m')
elif word == 'red':
colourCodes.append('\033[9m')
elif word == 'lblue':
colourCodes.append('\033[14m')
# Write the time to the history file
historyFile = open((expanduser("~") + "/.history.mash"), "a")
historyFile.write("\n")
@ -196,4 +201,4 @@ def mainLoop(startDir):
except KeyboardInterrupt:
print("\n")
mainLoop(currentDirectory)
mainLoop(initDirectory)
mainLoop(initDirectory)