| 
														
															@@ -9,22 +9,29 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 						 (loop for line = (read-line fh nil) 
														 | 
														
														 | 
														
															 						 (loop for line = (read-line fh nil) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 						       while line 
														 | 
														
														 | 
														
															 						       while line 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 						       do (format out "~a~%" line))))) 
														 | 
														
														 | 
														
															 						       do (format out "~a~%" line))))) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			     (clop:parse file-content))) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	(format T "~A: File not found" config-path)))) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			     (clop:parse file-content)))))) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			    
														 | 
														
														 | 
														
															 			    
														 | 
													
												
											
												
													
														| 
														 | 
														
															-(defvar *config* (config-parse "/home/swatson/Repos/cl-pest/config.toml")) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+(defvar *config* NIL) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 ;; Colors 
														 | 
														
														 | 
														
															 ;; Colors 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-(defvar *fg* (progn 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	       (if *config* 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		   (destructuring-bind (r g b) (subseq (assoc "fg" (cdr (assoc "colors" *config* :test #'equal)) :test #'equal) (- 4 3)) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		     (chlorophyll:create-rgb-color r g b)) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		   (chlorophyll:create-rgb-color 255 255 255)))) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-(defvar *bg* (chlorophyll:create-rgb-color 0 0 0)) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-(defvar *style* (chlorophyll:new-style 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+(defvar *fg* NIL)  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+(defvar *bg* NIL)  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+(defvar *style* NIL) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+(defun reload-config () 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  (setf *config* (config-parse "~/Repos/cl-pest/config.toml")) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  (setf *fg* (if *config* 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		 (destructuring-bind (r g b) (subseq (assoc "fg" (cdr (assoc "colors" *config* :test #'equal)) :test #'equal) (- 4 3)) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		   (chlorophyll:create-rgb-color r g b)) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		 (chlorophyll:create-rgb-color 255 255 255))) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  (setf *bg* (if *config* 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		 (destructuring-bind (r g b) (subseq (assoc "bg" (cdr (assoc "colors" *config* :test #'equal)) :test #'equal) (- 4 3)) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		   (chlorophyll:create-rgb-color r g b)) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		 (chlorophyll:create-rgb-color 0 0 0))) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  (setf *style* (chlorophyll:new-style 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		 :bold NIL 
														 | 
														
														 | 
														
															 		 :bold NIL 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		 :foreground *fg* 
														 | 
														
														 | 
														
															 		 :foreground *fg* 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		 :background *bg*)) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		 :background *bg*))) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 ;; Regex Scanners 
														 | 
														
														 | 
														
															 ;; Regex Scanners 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 ;; TODO $HOME rendered as /home/user as opposed to ~ 
														 | 
														
														 | 
														
															 ;; TODO $HOME rendered as /home/user as opposed to ~ 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -34,5 +41,5 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   (ppcre:regex-replace *home-scan* (uiop:getenv "PWD") "~/")) 
														 | 
														
														 | 
														
															   (ppcre:regex-replace *home-scan* (uiop:getenv "PWD") "~/")) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 (defun main () 
														 | 
														
														 | 
														
															 (defun main () 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  (setf *config* (config-parse "/home/swatson/Repos/cl-pest/config.toml")) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  (reload-config) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   (format T "~a λ " (chlorophyll:stylize *style* (pwd)))) 
														 | 
														
														 | 
														
															   (format T "~a λ " (chlorophyll:stylize *style* (pwd)))) 
														 |