feat: 🎸 New ponies

This commit is contained in:
Atsukoro1 2022-12-02 11:48:21 +01:00
parent 4f8f46df21
commit 7f8f666db1
7 changed files with 154 additions and 10 deletions

View file

@ -0,0 +1,30 @@
.-'( ).
.''`>' \___/ \
.' .'` .....-----...
/ .' __ .-` `.
/ / / \` .:'--:.
( / ( / \ `-.__..-;
Y | | `-..__ ., -
( ( '. \ ____`\ )`-._ _-`
'\ __/ __\' / `:``''`
( .|\_ ( / .-| |'.|
\ |' / ,'\ ( (WW| \W)j
\__.| | \_\_`/ ``-.
.--''''````-. |' l \__/
/ `. | `. -,______.-'
/ `.________.| `. /
( ,.--''>-',: |' | (
| | / (_) .| ,'),-``''-.
| .' | ,; |' / ,' `.
.| |. | (_) ;, '. (.( :
|' '| | (_) `'---'` `. `:`;
| '. / \ / `:. ; ':
|. `. | /-,_______\ ' ` .-; |
'| \_/ / | |\ `----'`.' .'
| ) / | | `--, \`''`
'. / | | | / )
`--_____--'| | | | ( |
`:._.` '. | | | | \ |
' .-. )| \ | \ `.___/
`---; ) )' \_______) \_______)
.:___-'

25
ponies/mcintosh_large.txt Normal file
View file

@ -0,0 +1,25 @@
_ ,.---'7
/ \.'.--.,<..
( . \'``'-..-.`\
( | -''--.\).`-j
\` .l \| `-
__ (/Y .-'WW) ` `.
(_ )(.( `'' ~ ~)
\\|| `.'.' '```--/
\|'.(.`.-...,---'`
,.---. ___ /( |,\`-; \
.' .--. '..'` `'( \'l`; \
/ .'-'''':/ _\.-- \ '.\ )\
( y' -`| /-.-\ \ .'`-. ) \
\( ( (((:.:)) \ '. `-.-' )
'. |\( \\\_// '. '. .-'`|
''.` \``` . '. `-'` /
\ \__. /'. .'
-' / .' ( '-.-'
| ,' .| | (
.' / (.' \ \
| ( ( \ \
| \ | \ /\\
.' ._/\ /\| . )\-' `:
|.;_/ )__(_.-''-` )-..-'
`'-----' `'--...-'

View file

@ -0,0 +1,27 @@
.... ,.----..
__ .-` / / _ `-.
/ \` ( ( ,'/ `.
( / \__ `-` .' /..-'`'-.
/| | `--___S' / )
A ( '. ______ ' .-'`
| \ \ | __\ / `: .'( __
.--:---, | :(\_ l / .-) |'.|\/ `(_ \
.' / `-. | : \ ( (WW| \W)j `.______/
.' | `. | '. \_\_`_| ``-.
| .' `, \ : \__/
.' | \ \ '. -,______.-'
| | .--. __________`.__ '. /
| | .' `.-' ./ _) | (
| `. | / A |\______-| \
'. '.' | A V | | |
| '.___.| V A | | |
| / | V \_______/ |
:. / / \ / \__/
___ .` '. (-' | /-,_______\ \
/ _ \'| r` '-. \ _/ / | |\ \
( (__/ | | \'-.__\/ / | | `--, \
\____/| l |\ | | | | / )
' `.__/ \__/| | | | ( |
`----' | | | | \ |
| \ | \ `.___/
\_______) \_______)

29
ponies/twilight_large.txt Normal file
View file

@ -0,0 +1,29 @@
_ .-.
(_) .` /
_(( ,' .'
-.,.--(;` )-.' .
(. \``''-`..'_ /.
.(\ )-.,,___ ''-.\
( \` :-..---.``.`'-.`.
| ( `| ,'.\ ) | `)
'. \ ,\ ( (WW|.' | )
| \ :'.\_`_|( .' )
,..--''-`- \ ._ `7 .'
,,.--'''''```) | '.\ ;--.__\/ :
.-'` .-'`/ |`. \\ \ ) .' /
,-'`, ,'` ( '. \ `) \/ .' /
.' ,-7 ,/ .-:` \>/| ) -, ) | /
l,' (_.'(_.'.-`-.; '@) )/-.'@. ( (
/ .'. -'(_-(__. `..-' `,) | | .---.
/ .' / ' ( Z\/S. ( (/\.-``\ ( _ `.
( ( ( | j .''7''---( \ . |: ' \ )
( ' | ( f `_.' ) \ ':| | '.__/ .|
\ )' .' |\ l \. ) |. .'/
\ | ) | '.\ '. / | ) `''`.'
_ | | | | | \ .\ .-' /,')/ )--'`
.:-.;\' ) ( | | ) `;'\ || . /)` .'-'
.'( '-`/ / \| (\ | _,> \(`( v.'-'
( '--' , -'`| (` : `--..-'\ /
\,__.-' ( '-`;''` | ''
'. .'--.-``''`
`'--'`

View file

@ -16,17 +16,30 @@ pub fn print_detail(title: &str, value: String, atype: ActionType, color: &str)
print!("{}", &value); print!("{}", &value);
}, },
ActionType::Delimiter => { ActionType::Delimiter => {
print("-----------------------------", true, "white_bold"); print("-----------------------------", true, "white");
}, },
ActionType::HostInfo => { ActionType::HostInfo => {
print(&format!( print(
"{}@{}", title,
title.to_owned(),
value.to_owned()
),
true, true,
&(color.to_owned() + "_bold") &(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");
} }
}; };
} }

View file

@ -9,7 +9,8 @@ mod args;
pub enum ActionType { pub enum ActionType {
HostInfo, HostInfo,
Delimiter, Delimiter,
Details Details,
Colors
} }
pub struct Action<'a> { pub struct Action<'a> {
@ -18,7 +19,7 @@ pub struct Action<'a> {
func: Option<fn() -> String>, func: Option<fn() -> String>,
} }
const ACTIONS: [Action; 10] = [ const ACTIONS: [Action; 12] = [
Action { Action {
action_type: ActionType::HostInfo, action_type: ActionType::HostInfo,
name: None, name: None,
@ -68,13 +69,23 @@ const ACTIONS: [Action; 10] = [
action_type: ActionType::Details, action_type: ActionType::Details,
name: Some("RAM"), name: Some("RAM"),
func: Some(system::specs::get_ram_used), 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() { fn main() {
let args: Args = Args::parse(); let args: Args = Args::parse();
for i in 0..12 { for i in 0..50 {
helpers::print::print_ponyline(i, &args.pony, &args.color); helpers::print::print_ponyline(i, &args.pony, &args.color);
if ACTIONS.get(i as usize).is_none() { if ACTIONS.get(i as usize).is_none() {
@ -108,6 +119,15 @@ fn main() {
ACTIONS[i as usize].action_type, ACTIONS[i as usize].action_type,
args.color.as_str() args.color.as_str()
); );
},
ActionType::Colors => {
helpers::print::print_detail(
"",
"".to_string(),
ActionType::Colors,
args.color.as_str()
);
} }
} }

View file

@ -61,7 +61,7 @@ fn eval_ram(line: String) -> u128 {
.parse::<u128>() .parse::<u128>()
.unwrap(); .unwrap();
(kbs / 1000) kbs / 1000
} }
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]