paleofetch

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

commit 5645ee8ffd64bb01d32af899e6f254f24da2ee12
parent 02906c28f9642b8af9928df39403bbfa25db5108
Author: Allis IO <0xa111510@gmail.com>
Date:   Wed, 22 Apr 2020 08:48:38 -0400

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;