Updated Manual

- added version manual
- added cd manual
This commit is contained in:
netbenix 2020-08-18 12:58:01 +02:00
parent d05ed9cd91
commit 5aa6890436
9 changed files with 168 additions and 122 deletions

1
.gitignore vendored
View file

@ -13,3 +13,4 @@ show_dir.o
change_dir.o
update_check.o
man.o
your-reality.o

38
etc/your-reality.c Normal file
View file

@ -0,0 +1,38 @@
#include <stdio.h>
#include <unistd.h>
#include "your-reality.h"
//Lyrics from "Your Reality" by Dan Salvato
//fs -> flush & sleep
void fs(int milliseconds){
fflush(stdout);
usleep(milliseconds*1000);
}
//p -> printf
void p(char* txt){
printf(txt);
}
void yourReality(){
printf("\e[?25l");
p("Loading ");
for(int i = 0; i < 2; i++){
//\033[XC => X columns right
//\033[XD => X columns left
printf("\033[3D "); printf("\033[3D");
fs(500); printf("."); fs(500); printf("."); fs(500); printf("."); fs(500);
}
printf("\n");
printf("\033[0;33mEvery "); fs(350); printf("day, ");
fs(700);
p("I "); fs(450); p("imagine "); fs(350); p("a "); fs(350); p("future "); fs(350); p("where "); fs(750);
p("i "); fs(300); p("can "); fs(300); p("be "); fs(300); p("with "); fs(300); p("you.");
p("\033[0m");
printf("\e[?25h");
}

6
etc/your-reality.h Normal file
View file

@ -0,0 +1,6 @@
#ifndef _YOUR_REALITY_H
#define _YOUR_REALITY_H
void yourReality();
#endif

21
main.c
View file

@ -15,6 +15,7 @@
#include "utils/sql_test.h"
#include "etc/logo.h"
#include "etc/man.h"
#include "etc/your-reality.h"
#include "utils/logger.h"
#include "utils/sys_info.h"
#include "utils/update_check.h"
@ -88,18 +89,16 @@ int commandHandler(char *cmd){
} else if(!strcmp(arg[0], "man")){
showManEntry(arg);
return 0;
} else if(!strcmp(arg[0], "rainbow")){
if(FUN_CONTENT){
while(1){
printf("\033[0;31m#####");
printf("\033[0;32m#####");
printf("\033[0;33m#####");
printf("\033[0;34m#####");
printf("\033[0;35m#####");
}
} else {
return 0;
} else if(!strcmp(arg[0], "rainbow") && FUN_CONTENT){
while(1){
printf("\033[0;31m#####");
printf("\033[0;32m#####");
printf("\033[0;33m#####");
printf("\033[0;34m#####");
printf("\033[0;35m#####");
}
} else if(!strcmp(arg[0], "your-reality") && FUN_CONTENT){
yourReality();
} else {
printf("Unknown command. Please use 'help' for more information.\n");
logger("User entered unknown command.");

View file

@ -2,7 +2,7 @@ CC= gcc
ARGS= -export-dynamic -ansi -std=gnu99
CFLAGS= $(shell pkg-config --cflags gtk+-3.0) -I/usr/include/mysql
LDLIBS= $(shell pkg-config --libs gtk+-3.0) -L/usr/lib/mysql -lmysqlclient
OBJ= main.o logo.o logger.o help.o sys_info.o gtk_test.o sql_test.o show_dir.o change_dir.o update_check.o man.o
OBJ= main.o logo.o logger.o help.o sys_info.o gtk_test.o sql_test.o show_dir.o change_dir.o update_check.o man.o your-reality.o
netbenixCMD: $(OBJ)
$(CC) $(CFLAGS) $(ARGS) -o netbenixCMD $(OBJ) $(LDLIBS)
@ -28,3 +28,5 @@ update_check.o: utils/update_check.c
$(CC) $(CFLAGS) -c utils/update_check.c
man.o: etc/man.c
$(CC) $(CFLAGS) -c etc/man.c
your-reality.o: etc/your-reality.c
$(CC) $(CFLAGS) -c etc/your-reality.c