mirror of
https://github.com/NotAShelf/tinierfetch.git
synced 2024-11-22 13:20:48 +00:00
please don't rewrite this in rust
This commit is contained in:
parent
e4aef3bd13
commit
136bd18f24
5 changed files with 12 additions and 17 deletions
Binary file not shown.
Before Width: | Height: | Size: 14 KiB |
15
README.md
15
README.md
|
@ -1,9 +1,12 @@
|
|||
# tinyfetch
|
||||
a simple fetch in C which is tiny and fast.. it takes 0.002 to 0.004s to fetch
|
||||
# tinierfetch
|
||||
|
||||
# depends
|
||||
- only c compiler and `TERM`, `LANG`, `USER`, `SHELL` environmental variables
|
||||
it's tinyfetch but also tinier - you could probably fit this in a QR code
|
||||
takes `0.001` to `0.003s` to fetch
|
||||
|
||||
# preview
|
||||
## depends
|
||||
|
||||
![master](2023-09-09-225931_294x283_scrot.png)
|
||||
a compiler (I used g++) and `TERM`, `LANG`, `USER`, `SHELL` environmental variables to be set
|
||||
|
||||
## preview
|
||||
|
||||
![yeah](./preview.png)
|
||||
|
|
BIN
preview.png
Normal file
BIN
preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
3
tinierfetch.cpp
Normal file
3
tinierfetch.cpp
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include <iostream>
|
||||
#define e getenv
|
||||
using namespace std;int main(){cout<<"\e[31muser:\e[0m "<<e("USER")<<"\n\e[32msh:\e[0m "<<e("SHELL")<<"\n\e[33mterm:\e[0m "<<e("TERM")<<"\n\e[34mlocale:\e[0m "<<e("LANG")<<"\n\e[35mcolors:\e[0m\e[41m \e[42m \e[43m \e[44m \e[45m \e[0m\n";}
|
11
tinyfetch.c
11
tinyfetch.c
|
@ -1,11 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void){
|
||||
printf("\x1b[31muser:\x1b[0m %s\n", getenv("USER"));
|
||||
printf("\x1b[32msh:\x1b[0m %s\n", getenv("SHELL"));
|
||||
printf("\x1b[33mterm:\x1b[0m %s\n", getenv("TERM"));
|
||||
printf("\x1b[34mlocale:\x1b[0m %s\n", getenv("LANG"));
|
||||
printf("\x1b[35mcolors: \x1b[0m\x1b[41m \x1b[42m \x1b[43m \x1b[44m \x1b[45m \x1b[0m\n");
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue