Lots of colours!
This commit is contained in:
		
							
								
								
									
										9
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								main.py
									
									
									
									
									
								
							@@ -1,7 +1,7 @@
 | 
				
			|||||||
#!/usr/bin/python3
 | 
					#!/usr/bin/python3
 | 
				
			||||||
 | 
					version = "0.2.0"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Imports, of course.
 | 
					# 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 os
 | 
				
			||||||
import socket
 | 
					import socket
 | 
				
			||||||
import subprocess
 | 
					import subprocess
 | 
				
			||||||
@@ -10,7 +10,6 @@ from datetime import datetime
 | 
				
			|||||||
from os.path import expanduser
 | 
					from os.path import expanduser
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Some initial variables
 | 
					# Some initial variables
 | 
				
			||||||
version = "0.2.0"
 | 
					 | 
				
			||||||
user = os.getlogin()
 | 
					user = os.getlogin()
 | 
				
			||||||
initDirectory = expanduser("~") 
 | 
					initDirectory = expanduser("~") 
 | 
				
			||||||
argList = ["", ""]
 | 
					argList = ["", ""]
 | 
				
			||||||
@@ -79,6 +78,12 @@ for word in confArgList:
 | 
				
			|||||||
                colourCodes.append('\033[32m')
 | 
					                colourCodes.append('\033[32m')
 | 
				
			||||||
            elif word == 'yellow':
 | 
					            elif word == 'yellow':
 | 
				
			||||||
                colourCodes.append('\033[33m')
 | 
					                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
 | 
					# Write the time to the history file
 | 
				
			||||||
historyFile = open((expanduser("~") + "/.history.mash"), "a")
 | 
					historyFile = open((expanduser("~") + "/.history.mash"), "a")
 | 
				
			||||||
historyFile.write("\n")
 | 
					historyFile.write("\n")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user