commit d3791887b14e4be265097cc32673ee91ca310b37
parent dce69393d59b26b02cd86acd5f40032a70f0f752
Author: sam-barr <samfbarr@outlook.com>
Date: Wed, 22 Apr 2020 22:03:36 -0500
Merge pull request #18 from allisio/logo-things
Extract color sequences from logo and add a second option
Diffstat:
3 files changed, 48 insertions(+), 28 deletions(-)
diff --git a/logos/arch.h b/logos/arch.h
@@ -0,0 +1,22 @@
+// This was stolen from neofetch
+char *LOGO[] = {
+ "\e[1;36m -` ",
+ "\e[1;36m .o+` ",
+ "\e[1;36m `ooo/ ",
+ "\e[1;36m `+oooo: ",
+ "\e[1;36m `+oooooo: ",
+ "\e[1;36m -+oooooo+: ",
+ "\e[1;36m `/:-:++oooo+: ",
+ "\e[1;36m `/++++/+++++++: ",
+ "\e[1;36m `/++++++++++++++: ",
+ "\e[1;36m `/+++ooooooooooooo/` ",
+ "\e[1;36m ./ooosssso++osssssso+` ",
+ "\e[1;36m .oossssso-````/ossssss+` ",
+ "\e[1;36m -osssssso. :ssssssso. ",
+ "\e[1;36m :osssssss/ osssso+++. ",
+ "\e[1;36m /ossssssss/ +ssssooo/- ",
+ "\e[1;36m `/ossssso+/:- -:/+osssso+- ",
+ "\e[1;36m `+sso+:-` `.-/+oso: ",
+ "\e[1;36m`++:. `-/+/ ",
+ "\e[1;36m.` `/ "
+};
diff --git a/logos/arch2.h b/logos/arch2.h
@@ -0,0 +1,21 @@
+// And this was stolen from archey3
+char *LOGO[] = {
+ "\e[1;36m + ",
+ "\e[1;36m # ",
+ "\e[1;36m ### ",
+ "\e[1;36m ##### ",
+ "\e[1;36m ###### ",
+ "\e[1;36m ; #####; ",
+ "\e[1;36m +##.##### ",
+ "\e[1;36m +########## ",
+ "\e[1;36m #############; ",
+ "\e[1;36m ###############+ ",
+ "\e[1;36m ####### ####### ",
+ "\e[1;36m .######; ;###;`'. ",
+ "\e[1;36m .#######; ;#####. ",
+ "\e[1;36m #########. .########` ",
+ "\e[1;36m ######' '###### ",
+ "\e[1;36m ;#### ####; ",
+ "\e[1;36m ##' '## ",
+ "\e[1;36m#' `# "
+};
diff --git a/paleofetch.c b/paleofetch.c
@@ -13,6 +13,7 @@
#include <X11/Xatom.h>
#include "paleofetch.h"
+#include "logos/arch2.h"
#define DISTRO "Arch"
#define BUF_SIZE 150
@@ -41,31 +42,6 @@ struct conf {
{ "", get_colors2, false },
};
-// I copy pasted this from neofetch, in case you were curious
-char *logo[] = {
- "\e[1;36m -` ",
- "\e[1;36m .o+` ",
- "\e[1;36m `ooo/ ",
- "\e[1;36m `+oooo: ",
- "\e[1;36m `+oooooo: ",
- "\e[1;36m -+oooooo+: ",
- "\e[1;36m `/:-:++oooo+: ",
- "\e[1;36m `/++++/+++++++: ",
- "\e[1;36m `/++++++++++++++: ",
- "\e[1;36m `/+++ooooooooooooo/` ",
- "\e[1;36m ./ooosssso++osssssso+` ",
- "\e[1;36m .oossssso-````/ossssss+` ",
- "\e[1;36m -osssssso. :ssssssso. ",
- "\e[1;36m :osssssss/ osssso+++. ",
- "\e[1;36m /ossssssss/ +ssssooo/- ",
- "\e[1;36m `/ossssso+/:- -:/+osssso+- ",
- "\e[1;36m `+sso+:-` `.-/+oso: ",
- "\e[1;36m`++:. `-/+/ ",
- "\e[1;36m.` `/ "
-};
-
-// TODO: Finish it
-
Display *display;
struct utsname uname_info;
struct sysinfo my_sysinfo;
@@ -520,16 +496,17 @@ int main(int argc, char *argv[]) {
#define COUNT(x) (int)(sizeof x / sizeof *x)
- for (int i = 0; i < COUNT(logo); i++) {
+ for (int i = 0; i < COUNT(LOGO); i++) {
// If we've run out of information to show...
if(i >= COUNT(config)) // just print the next line of the logo
- puts(logo[i]);
+ puts(LOGO[i]);
else {
// Otherwise, we've got a bit of work to do.
char *label = config[i].label,
*value = get_value(config[i], read_cache, cache_data);
- printf("%s%s\e[0m%s\n", logo[i], label, value);
+ printf("\e[1;36m%s%s\e[0m%s\n", LOGO[i], label, value);
free(value);
+
}
}
puts("\e[0m");