diff --git a/ponies/applejack_large.txt b/ponies/applejack_large.txt new file mode 100644 index 0000000..bba82e6 --- /dev/null +++ b/ponies/applejack_large.txt @@ -0,0 +1,30 @@ + .-'( ). + .''`>' \___/ \ + .' .'` .....-----... + / .' __ .-` `. + / / / \` .:'--:. + ( / ( / \ `-.__..-; + Y | | `-..__ ., - + ( ( '. \ ____`\ )`-._ _-` + '\ __/ __\' / `:``''` + ( .|\_ ( / .-| |'.| + \ |' / ,'\ ( (WW| \W)j + \__.| | \_\_`/ ``-. + .--''''````-. |' l \__/ + / `. | `. -,______.-' + / `.________.| `. / + ( ,.--''>-',: |' | ( + | | / (_) .| ,'),-``''-. + | .' | ,; |' / ,' `. + .| |. | (_) ;, '. (.( : + |' '| | (_) `'---'` `. `:`; + | '. / \ / `:. ; ': + |. `. | /-,_______\ ' ` .-; | + '| \_/ / | |\ `----'`.' .' + | ) / | | `--, \`''` + '. / | | | / ) + `--_____--'| | | | ( | +`:._.` '. | | | | \ | + ' .-. )| \ | \ `.___/ + `---; ) )' \_______) \_______) + .:___-' \ No newline at end of file diff --git a/ponies/mcintosh_large.txt b/ponies/mcintosh_large.txt new file mode 100644 index 0000000..a3993dd --- /dev/null +++ b/ponies/mcintosh_large.txt @@ -0,0 +1,25 @@ + _ ,.---'7 + / \.'.--.,<.. + ( . \'``'-..-.`\ + ( | -''--.\).`-j + \` .l \| `- + __ (/Y .-'WW) ` `. + (_ )(.( `'' ~ ~) + \\|| `.'.' '```--/ + \|'.(.`.-...,---'` + ,.---. ___ /( |,\`-; \ + .' .--. '..'` `'( \'l`; \ + / .'-'''':/ _\.-- \ '.\ )\ +( y' -`| /-.-\ \ .'`-. ) \ + \( ( (((:.:)) \ '. `-.-' ) + '. |\( \\\_// '. '. .-'`| + ''.` \``` . '. `-'` / + \ \__. /'. .' + -' / .' ( '-.-' + | ,' .| | ( + .' / (.' \ \ + | ( ( \ \ + | \ | \ /\\ + .' ._/\ /\| . )\-' `: + |.;_/ )__(_.-''-` )-..-' + `'-----' `'--...-' \ No newline at end of file diff --git a/ponies/pinkiepie_large.txt b/ponies/pinkiepie_large.txt new file mode 100644 index 0000000..1ce96bc --- /dev/null +++ b/ponies/pinkiepie_large.txt @@ -0,0 +1,27 @@ + .... ,.----.. + __ .-` / / _ `-. + / \` ( ( ,'/ `. + ( / \__ `-` .' /..-'`'-. + /| | `--___S' / ) + A ( '. ______ ' .-'` + | \ \ | __\ / `: .'( __ + .--:---, | :(\_ l / .-) |'.|\/ `(_ \ + .' / `-. | : \ ( (WW| \W)j `.______/ + .' | `. | '. \_\_`_| ``-. + | .' `, \ : \__/ + .' | \ \ '. -,______.-' + | | .--. __________`.__ '. / + | | .' `.-' ./ _) | ( + | `. | / A |\______-| \ + '. '.' | A V | | | + | '.___.| V A | | | + | / | V \_______/ | + :. / / \ / \__/ + ___ .` '. (-' | /-,_______\ \ + / _ \'| r` '-. \ _/ / | |\ \ +( (__/ | | \'-.__\/ / | | `--, \ + \____/| l |\ | | | | / ) + ' `.__/ \__/| | | | ( | + `----' | | | | \ | + | \ | \ `.___/ + \_______) \_______) \ No newline at end of file diff --git a/ponies/twilight_large.txt b/ponies/twilight_large.txt new file mode 100644 index 0000000..e187e24 --- /dev/null +++ b/ponies/twilight_large.txt @@ -0,0 +1,29 @@ + _ .-. + (_) .` / + _(( ,' .' + -.,.--(;` )-.' . + (. \``''-`..'_ /. + .(\ )-.,,___ ''-.\ + ( \` :-..---.``.`'-.`. + | ( `| ,'.\ ) | `) + '. \ ,\ ( (WW|.' | ) + | \ :'.\_`_|( .' ) + ,..--''-`- \ ._ `7 .' + ,,.--'''''```) | '.\ ;--.__\/ : + .-'` .-'`/ |`. \\ \ ) .' / + ,-'`, ,'` ( '. \ `) \/ .' / +.' ,-7 ,/ .-:` \>/| ) -, ) | / +l,' (_.'(_.'.-`-.; '@) )/-.'@. ( ( + / .'. -'(_-(__. `..-' `,) | | .---. + / .' / ' ( Z\/S. ( (/\.-``\ ( _ `. + ( ( ( | j .''7''---( \ . |: ' \ ) + ( ' | ( f `_.' ) \ ':| | '.__/ .| + \ )' .' |\ l \. ) |. .'/ + \ | ) | '.\ '. / | ) `''`.' + _ | | | | | \ .\ .-' /,')/ )--'` + .:-.;\' ) ( | | ) `;'\ || . /)` .'-' + .'( '-`/ / \| (\ | _,> \(`( v.'-' + ( '--' , -'`| (` : `--..-'\ / + \,__.-' ( '-`;''` | '' + '. .'--.-``''` + `'--'` \ No newline at end of file diff --git a/src/helpers/print.rs b/src/helpers/print.rs index bd5d2e7..2a2983d 100644 --- a/src/helpers/print.rs +++ b/src/helpers/print.rs @@ -16,17 +16,30 @@ pub fn print_detail(title: &str, value: String, atype: ActionType, color: &str) print!("{}", &value); }, ActionType::Delimiter => { - print("-----------------------------", true, "white_bold"); + print("-----------------------------", true, "white"); }, ActionType::HostInfo => { - print(&format!( - "{}@{}", - title.to_owned(), - value.to_owned() - ), + print( + title, true, &(color.to_owned() + "_bold") ); + print("@", true, "white_bold"); + print( + &value, + true, + &(color.to_owned() + "_bold") + ); + }, + + ActionType::Colors => { + // Print the color blocks like neofetch + print("████", true, "black"); + print("████", true, "red"); + print("████", true, "green"); + print("████", true, "yellow"); + print("████", true, "blue"); + print("████", true, "magenta"); } }; } diff --git a/src/main.rs b/src/main.rs index eb758cc..9a9e209 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,7 +9,8 @@ mod args; pub enum ActionType { HostInfo, Delimiter, - Details + Details, + Colors } pub struct Action<'a> { @@ -18,7 +19,7 @@ pub struct Action<'a> { func: Option String>, } -const ACTIONS: [Action; 10] = [ +const ACTIONS: [Action; 12] = [ Action { action_type: ActionType::HostInfo, name: None, @@ -68,13 +69,23 @@ const ACTIONS: [Action; 10] = [ action_type: ActionType::Details, name: Some("RAM"), func: Some(system::specs::get_ram_used), + }, + Action { + action_type: ActionType::Delimiter, + name: None, + func: None, + }, + Action { + action_type: ActionType::Colors, + name: None, + func: None, } ]; fn main() { let args: Args = Args::parse(); - for i in 0..12 { + for i in 0..50 { helpers::print::print_ponyline(i, &args.pony, &args.color); if ACTIONS.get(i as usize).is_none() { @@ -108,6 +119,15 @@ fn main() { ACTIONS[i as usize].action_type, args.color.as_str() ); + }, + + ActionType::Colors => { + helpers::print::print_detail( + "", + "".to_string(), + ActionType::Colors, + args.color.as_str() + ); } } diff --git a/src/system/specs.rs b/src/system/specs.rs index 3bcd62b..6aa53df 100644 --- a/src/system/specs.rs +++ b/src/system/specs.rs @@ -61,7 +61,7 @@ fn eval_ram(line: String) -> u128 { .parse::() .unwrap(); - (kbs / 1000) + kbs / 1000 } #[cfg(target_os = "linux")]