This commit is contained in:
Јован Ђокић-Шумарац 2020-12-14 02:44:46 +01:00
parent 4f1a36553a
commit 76ca2b6fb5
3 changed files with 9 additions and 2 deletions

View file

@ -16,7 +16,7 @@ void main(){
printf("\x1b[1m / .-. \\ \x1b[36mSHELL\x1b[0m: %s\n", shell); printf("\x1b[1m / .-. \\ \x1b[36mSHELL\x1b[0m: %s\n", shell);
printf("\x1b[1m / ( ) _\\ \x1b[36mCPU\x1b[0m: %s\n", cpu); printf("\x1b[1m / ( ) _\\ \x1b[36mCPU\x1b[0m: %s\n", cpu);
printf("\x1b[1m / _.~ ~._^\\ \x1b[36mGPU\x1b[0m: %s\n", gpu); printf("\x1b[1m / _.~ ~._^\\ \x1b[36mGPU\x1b[0m: %s\n", gpu);
printf("\x1b[1m /.^ ^.\\ \x1b\n"); printf("\x1b[1m /.^ ^.\\ \x1b[36mWM\x1b[0m: %s\n", wm);
printf("\n\n"); printf("\n\n");
} }

9
info.h
View file

@ -2,9 +2,15 @@ int hrs, min,
sec, pkgs; sec, pkgs;
char kernel[50], shell[25], char kernel[50], shell[25],
cpu[70], gpu[70]; cpu[70], gpu[70], wm[15];
void getWM(){
FILE *windowManager = popen("awk 'END{ print $2 }' $HOME/.xinitrc", "r");
fscanf(windowManager, "%[^\n]%s", &wm);
fclose(windowManager);
}
void getCPU(){ void getCPU(){
@ -56,6 +62,7 @@ void getShell(){
} }
void init(){ void init(){
getWM();
getGPU(); getGPU();
getCPU(); getCPU();
getKernel(); getKernel();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 93 KiB