From 06ed635c21c496e31e0bac558c881810f900c341 Mon Sep 17 00:00:00 2001 From: max Date: Mon, 29 Jul 2024 13:09:44 +1000 Subject: [PATCH] Lots of colours! --- main.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index cb002f5..47dfb73 100755 --- a/main.py +++ b/main.py @@ -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) \ No newline at end of file +mainLoop(initDirectory)