@@ -56,9 +56,10 @@ lazy_static! {
5656 static ref OSNAME : String = ffetch:: get_os_name( ) ;
5757 static ref DESKTOP : String = ffetch:: get_desktop_env( ) ;
5858 static ref LOCALE : String = ffetch:: get_locale( ) ;
59+ static ref BACKEND : String = ffetch:: get_compositor( ) ;
5960 static ref ARCH : String = ffetch:: get_cpu_arch( ) ;
6061 static ref PLATFORM : String = ffetch:: get_platform( ) ;
61- static ref UPTIME : String = ffetch:: get_uptime( ) ;
62+ static ref UPTIME : String = ffetch:: get_uptime( ) ;
6263 static ref SHELL : String = ffetch:: get_shell( ) ;
6364 static ref PACKAGES : String = ffetch:: get_packages( ) ;
6465 static ref GPU : String = ffetch:: get_gpu( ) ;
@@ -126,7 +127,7 @@ fn comp_with_mon_argument(input: &str) -> usize {
126127}
127128
128129fn find_token ( string : & str , findstr : & str ) -> bool {
129- let tokens : Vec < & str > = string. split ( " " ) . collect ( ) ;
130+ let tokens: Vec < & str > = string. split ( " " ) . collect ( ) ;
130131 for item in & tokens {
131132 if item == & findstr {
132133 return true ;
@@ -154,6 +155,7 @@ fn replace_syntax(conf: &str) -> String {
154155 . replace ( "getOsName" , & OSNAME )
155156 . replace ( "getDesktop" , & DESKTOP )
156157 . replace ( "getArch" , & ARCH )
158+ . replace ( "getBackend" , & BACKEND )
157159 . replace ( "getPlatform" , & PLATFORM )
158160 . replace ( "getUptime" , & UPTIME )
159161 . replace ( "getPackages" , & PACKAGES )
@@ -285,6 +287,8 @@ fn lex_config(input: &str) -> String {
285287 result
286288}
287289
290+ // fn colorize_ascii(ascii: String) {}
291+
288292fn write_fetch ( ascii : Vec < String > , ascii_color : String ) -> String {
289293 let max_width = ascii. iter ( ) . map ( |line| line. len ( ) ) . max ( ) . unwrap_or ( 0 ) ;
290294 let mut ascii_index = 0 ;
0 commit comments