From 1599da66799b0dcc8036008b497b199d73c5762c Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Mon, 14 Sep 2020 12:25:05 +1000 Subject: [PATCH 01/22] Update paleofetch.h --- paleofetch.h | 1 + 1 file changed, 1 insertion(+) diff --git a/paleofetch.h b/paleofetch.h index 0e4578f..c343491 100644 --- a/paleofetch.h +++ b/paleofetch.h @@ -21,6 +21,7 @@ static char *get_title(), *get_colors1(), *get_colors2(), *spacer(); + *get_name(); #define SPACER {"", spacer, false}, #define REMOVE(A) { (A), NULL, sizeof(A) - 1 , 0 } From 6fc4e516776637e1fae4712f15f8f86ddce43bee Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Mon, 14 Sep 2020 12:26:03 +1000 Subject: [PATCH 02/22] Update config.h --- config.h | 1 + 1 file changed, 1 insertion(+) diff --git a/config.h b/config.h index 39c621c..dc7ea95 100644 --- a/config.h +++ b/config.h @@ -23,6 +23,7 @@ SPACER \ { "", get_colors1, false }, \ { "", get_colors2, false }, \ + { "", get_name, false }, \ } #define CPU_CONFIG \ From 0e3538e36bfc954b16ab19a3b48a90cca1bf7376 Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 11:03:52 +1000 Subject: [PATCH 03/22] Update paleofetch.h --- paleofetch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paleofetch.h b/paleofetch.h index c343491..f7118b2 100644 --- a/paleofetch.h +++ b/paleofetch.h @@ -21,7 +21,7 @@ static char *get_title(), *get_colors1(), *get_colors2(), *spacer(); - *get_name(); + *get_pcname(); #define SPACER {"", spacer, false}, #define REMOVE(A) { (A), NULL, sizeof(A) - 1 , 0 } From 0d2547b016227d1a74995158a36bb3b8609ca93e Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 11:27:03 +1000 Subject: [PATCH 04/22] Update config.h --- config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.h b/config.h index dc7ea95..e0bd645 100644 --- a/config.h +++ b/config.h @@ -23,7 +23,7 @@ SPACER \ { "", get_colors1, false }, \ { "", get_colors2, false }, \ - { "", get_name, false }, \ + { "PC name:", get_pcname, false }, \ } #define CPU_CONFIG \ From e70f43acadf5768ad9dcc5e01d070b532151266b Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 11:29:49 +1000 Subject: [PATCH 05/22] Create pcname.txt --- pcname.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 pcname.txt diff --git a/pcname.txt b/pcname.txt new file mode 100644 index 0000000..7e04284 --- /dev/null +++ b/pcname.txt @@ -0,0 +1 @@ +// replace with PC name From b6c20ede1812149b41632aea25c59893812256a2 Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 11:30:12 +1000 Subject: [PATCH 06/22] Delete pcname.txt --- pcname.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 pcname.txt diff --git a/pcname.txt b/pcname.txt deleted file mode 100644 index 7e04284..0000000 --- a/pcname.txt +++ /dev/null @@ -1 +0,0 @@ -// replace with PC name From e397cb764c0e8234d1ad167fdacf60c4972e8e3d Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 11:34:55 +1000 Subject: [PATCH 07/22] Create pcname.txt --- PCnameconfig/pcname.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 PCnameconfig/pcname.txt diff --git a/PCnameconfig/pcname.txt b/PCnameconfig/pcname.txt new file mode 100644 index 0000000..e8be640 --- /dev/null +++ b/PCnameconfig/pcname.txt @@ -0,0 +1 @@ +Replace with name. From 31b3967756f14effacecdd23e9ed08a3ae2fc815 Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 11:35:55 +1000 Subject: [PATCH 08/22] Delete pcname.txt --- PCnameconfig/pcname.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 PCnameconfig/pcname.txt diff --git a/PCnameconfig/pcname.txt b/PCnameconfig/pcname.txt deleted file mode 100644 index e8be640..0000000 --- a/PCnameconfig/pcname.txt +++ /dev/null @@ -1 +0,0 @@ -Replace with name. From fc6b395520af2625b77b23a6d415c05ed52374cd Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 11:36:48 +1000 Subject: [PATCH 09/22] Create pc_name.txt --- config_scripts/pc_name.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 config_scripts/pc_name.txt diff --git a/config_scripts/pc_name.txt b/config_scripts/pc_name.txt new file mode 100644 index 0000000..e8be640 --- /dev/null +++ b/config_scripts/pc_name.txt @@ -0,0 +1 @@ +Replace with name. From deb66a76d3b101bb26a79070b426c11b655b6c02 Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 12:48:30 +1000 Subject: [PATCH 10/22] Update config.h --- config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.h b/config.h index e0bd645..56581f8 100644 --- a/config.h +++ b/config.h @@ -23,7 +23,7 @@ SPACER \ { "", get_colors1, false }, \ { "", get_colors2, false }, \ - { "PC name:", get_pcname, false }, \ + { "PC name: ", get_pcname, false }, \ } #define CPU_CONFIG \ From d658d0633877458369df6210fe23bbbed66afcf2 Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 13:30:35 +1000 Subject: [PATCH 11/22] Added pc_name reading script to paleofetch.c --- paleofetch.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/paleofetch.c b/paleofetch.c index 72ce826..91db3eb 100644 --- a/paleofetch.c +++ b/paleofetch.c @@ -630,6 +630,12 @@ static char *get_colors2() { return colors2; } +static char *get_pcname(){ + char pc_name[1024] // I doubt anyone has a PC with a name over 1024 charectors. + FILE *fp_pcname = fopen("./config_scripts/pc_name.txt","r"); // open the file as fp_pcname + fscanf(fp_pcname,"%[^\n]",pc_name); // read pc name + return *pc_name; +} static char *spacer() { return calloc(1, 1); // freeable, null-terminated string of length 1 From 336bb046cd1ed68378128a6b07e03f34a95e6c66 Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 13:33:46 +1000 Subject: [PATCH 12/22] Update pc_name.txt --- config_scripts/pc_name.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config_scripts/pc_name.txt b/config_scripts/pc_name.txt index e8be640..5a7a913 100644 --- a/config_scripts/pc_name.txt +++ b/config_scripts/pc_name.txt @@ -1 +1,2 @@ -Replace with name. + +Put you computers name in the line above. If left blank with get_pcname() still in config.h, "PC name: " will still be printed, but nothing after that. From d1e1f700dc536ed1209ad8d35023cc25f381caf3 Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 13:36:42 +1000 Subject: [PATCH 13/22] Update config.h --- config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.h b/config.h index 56581f8..7a1d99c 100644 --- a/config.h +++ b/config.h @@ -23,7 +23,7 @@ SPACER \ { "", get_colors1, false }, \ { "", get_colors2, false }, \ - { "PC name: ", get_pcname, false }, \ + //{ "PC name: ", get_pcname, false }, \ PC name is commented out by default as it requires editing pc_name.txt in config_scripts to add a name. } #define CPU_CONFIG \ From 78fef29a2c0f435021a7773259fb795170656c83 Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 13:50:45 +1000 Subject: [PATCH 14/22] Added get_pcname to README --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index c966979..9a86c04 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ which function paleofetch will call display. Current available getter functions * `get_gpu1`, `get_gpu2`: Print the GPU on your system. If you don't have both integrated graphics and an external GPU, `get_gpu2` will likely be blank * `get_gpu`: (Tries to) print your current GPU * `get_colors1`, `get_colors2`: Prints the colors of your terminal +* `get_pcname`,: Prints the PC name on the first line of ./config_scripts/pcname.txt To include a blank line between entries, put `SPACER \` between the two lines you want to separate. @@ -100,3 +101,5 @@ FAQ Q: Do you really run neofetch every time you open a terminal? A: Yes, I like the way it looks and like that it causes my prompt to start midway down the screen. I do acknowledge that the information it presents is not actually useful. +Q: I put a name in ./config_scripts/pcname.txt but it is not printing the name? +A: You need to uncomment the line with `get_pcname()` in `paleofetch.h`. From b533b5bf8e65f6096c06de97606c72d65f3fd4e3 Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 13:51:15 +1000 Subject: [PATCH 15/22] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a86c04..b839a14 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ which function paleofetch will call display. Current available getter functions * `get_gpu1`, `get_gpu2`: Print the GPU on your system. If you don't have both integrated graphics and an external GPU, `get_gpu2` will likely be blank * `get_gpu`: (Tries to) print your current GPU * `get_colors1`, `get_colors2`: Prints the colors of your terminal -* `get_pcname`,: Prints the PC name on the first line of ./config_scripts/pcname.txt +* `get_pcname`: Prints the PC name on the first line of ./config_scripts/pcname.txt To include a blank line between entries, put `SPACER \` between the two lines you want to separate. @@ -101,5 +101,6 @@ FAQ Q: Do you really run neofetch every time you open a terminal? A: Yes, I like the way it looks and like that it causes my prompt to start midway down the screen. I do acknowledge that the information it presents is not actually useful. + Q: I put a name in ./config_scripts/pcname.txt but it is not printing the name? A: You need to uncomment the line with `get_pcname()` in `paleofetch.h`. From a33291aae98d1e5a6a91384b857c22267f331ce8 Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 13:51:50 +1000 Subject: [PATCH 16/22] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b839a14..459d4f5 100644 --- a/README.md +++ b/README.md @@ -103,4 +103,5 @@ A: Yes, I like the way it looks and like that it causes my prompt to start midwa down the screen. I do acknowledge that the information it presents is not actually useful. Q: I put a name in ./config_scripts/pcname.txt but it is not printing the name? + A: You need to uncomment the line with `get_pcname()` in `paleofetch.h`. From 2993adc7b710b29019ee8afba6a91d8e3d37e3c0 Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 13:54:45 +1000 Subject: [PATCH 17/22] Rename pc_name.txt to pcname.txt --- config_scripts/{pc_name.txt => pcname.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename config_scripts/{pc_name.txt => pcname.txt} (100%) diff --git a/config_scripts/pc_name.txt b/config_scripts/pcname.txt similarity index 100% rename from config_scripts/pc_name.txt rename to config_scripts/pcname.txt From a82129396a589b2806d9f0c53e1ccf62470140db Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 13:55:08 +1000 Subject: [PATCH 18/22] Update config.h --- config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.h b/config.h index 7a1d99c..5c92c70 100644 --- a/config.h +++ b/config.h @@ -23,7 +23,7 @@ SPACER \ { "", get_colors1, false }, \ { "", get_colors2, false }, \ - //{ "PC name: ", get_pcname, false }, \ PC name is commented out by default as it requires editing pc_name.txt in config_scripts to add a name. + //{ "PC name: ", get_pcname, false }, \ PC name is commented out by default as it requires editing pcname.txt in config_scripts to add a name. } #define CPU_CONFIG \ From 29c8294773c515f04a9fe9fbc04e088fe24f83ff Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 13:55:26 +1000 Subject: [PATCH 19/22] Update config.h --- config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.h b/config.h index 5c92c70..fa1325a 100644 --- a/config.h +++ b/config.h @@ -23,7 +23,7 @@ SPACER \ { "", get_colors1, false }, \ { "", get_colors2, false }, \ - //{ "PC name: ", get_pcname, false }, \ PC name is commented out by default as it requires editing pcname.txt in config_scripts to add a name. + //{ "PC name: ", get_pcname, false }, \ //PC name is commented out by default as it requires editing pcname.txt in config_scripts to add a name. } #define CPU_CONFIG \ From 1425cd53b5b4f879c58e0f8c1a1b08e6490e8c45 Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 13:56:21 +1000 Subject: [PATCH 20/22] Changed filename to pcname.txt instead of pc_name.txt --- paleofetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paleofetch.c b/paleofetch.c index 91db3eb..9d2cc5c 100644 --- a/paleofetch.c +++ b/paleofetch.c @@ -632,7 +632,7 @@ static char *get_colors2() { } static char *get_pcname(){ char pc_name[1024] // I doubt anyone has a PC with a name over 1024 charectors. - FILE *fp_pcname = fopen("./config_scripts/pc_name.txt","r"); // open the file as fp_pcname + FILE *fp_pcname = fopen("./config_scripts/pcname.txt","r"); // open the file as fp_pcname fscanf(fp_pcname,"%[^\n]",pc_name); // read pc name return *pc_name; } From 896d41e4a422fd17cbfed92b9bf9bc210f03b024 Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Tue, 15 Sep 2020 14:01:01 +1000 Subject: [PATCH 21/22] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 459d4f5..c748c55 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,7 @@ FAQ --- Q: Do you really run neofetch every time you open a terminal? + A: Yes, I like the way it looks and like that it causes my prompt to start midway down the screen. I do acknowledge that the information it presents is not actually useful. From 45941a7091b1a51312bcf9fdb1c80a5d2ea89543 Mon Sep 17 00:00:00 2001 From: Jake <68929154+AstroBlade@users.noreply.github.com> Date: Mon, 12 Oct 2020 10:07:12 +1100 Subject: [PATCH 22/22] Update pcname.txt --- config_scripts/pcname.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_scripts/pcname.txt b/config_scripts/pcname.txt index 5a7a913..015fc55 100644 --- a/config_scripts/pcname.txt +++ b/config_scripts/pcname.txt @@ -1,2 +1,2 @@ -Put you computers name in the line above. If left blank with get_pcname() still in config.h, "PC name: " will still be printed, but nothing after that. +Put your computers name in the line above. If left blank with get_pcname() still in config.h, "PC name: " will still be printed, but nothing after that.