small bugfix and cleanup

This commit is contained in:
Palanix 2021-07-12 00:06:24 +02:00
parent 33ad789e89
commit c7eaa8c773
2 changed files with 2 additions and 3 deletions

View File

@ -9,8 +9,6 @@ install: wayfetch
uninstall:
rm -f /bin/wayfetch
.PHONY: all clean install uninstall
config.h: | config.pre.h
cp config.pre.h $@

3
main.c
View File

@ -193,7 +193,7 @@ void get_packages() {
if(dirp == NULL) {
printf("dir doesn't exist");
}
} else {
while((entry = readdir(dirp)) != NULL) {
if(entry->d_type == DT_DIR) num_packages++;
@ -204,6 +204,7 @@ void get_packages() {
snprintf(info[i], 150, COLOR"Packages"SEPARATOR" "CLOSE"%d", num_packages);
i += 1;
}
}
void get_wm() {
snprintf(info[i], 150, COLOR"DE/WM"SEPARATOR" "CLOSE"%s", getenv("XDG_CURRENT_DESKTOP"));