paleofetch

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit d587fb51a38ce982a685edfd6396f782da34f2f7
parent 02906c28f9642b8af9928df39403bbfa25db5108
Author: sam-barr <samfbarr@outlook.com>
Date:   Wed, 22 Apr 2020 07:54:56 -0500

Merge pull request #6 from allisio/master

Swap user and host in get_title()
Diffstat:
Mpaleofetch.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/paleofetch.c b/paleofetch.c @@ -61,7 +61,7 @@ char *get_title() { title_length = strlen(hostname) + strlen(username) + 1; char *title = malloc(BUF_SIZE); - snprintf(title, BUF_SIZE, "\e[1;36m%s\e[0m@\e[1;36m%s", hostname, username); + snprintf(title, BUF_SIZE, "\e[1;36m%s\e[0m@\e[1;36m%s", username, hostname); return title; } @@ -185,7 +185,7 @@ char *get_memory() { status = -1; halt_and_catch_fire("Unable to open meminfo"); } - + /* We parse through all lines of meminfo and scan for the information we need */ char *line = malloc(BUF_SIZE); size_t len; /* unused */ @@ -204,7 +204,7 @@ char *get_memory() { free(line); fclose(meminfo); - + /* use same calculation as neofetch */ used_memory = (total + shared - memfree - buffers - cached - reclaimable) / 1024; total_memory = total / 1024;