| 
					
				 | 
			
			
				@@ -21,6 +21,15 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ;; Battery 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 (defvar *display-battery* NIL) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+;; Git 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+(defvar *display-git* NIL) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+(defvar *git-string* NIL) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+(defun display-git-info () 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  (if (probe-file (pathname (concatenate 'string (uiop:getenv "PWD") "/.git"))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      ;; (legit:git-rev-parse "HEAD" :short T))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      (concatenate 'string (legit:current-branch ".") "|" (legit:current-commit "." :short T)))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 (defun reload-config () 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   (setf *config* (config-parse "~/Repos/cl-pest/config.toml")) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   (setf *fg* (if *config* 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -36,7 +45,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   (setf *style* (chlorophyll:new-style 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 :bold NIL 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 :foreground *fg* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		 :background *bg*))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		 :background *bg*)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  (setf *git-string* (if (cdr (assoc "display_head" (cdr (assoc "git" *config* :test #'equal)) :test #'equal)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			 (setf *git-string* (display-git-info))))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ;; Regex Scanners 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ;; TODO $HOME rendered as /home/user as opposed to ~ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -47,4 +58,4 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 (defun main () 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   (reload-config) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  (format T "~a λ " (chlorophyll:stylize *style* (pwd)))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  (format T "~a ~a λ " (chlorophyll:stylize *style* (pwd)) *git-string*)) 
			 |