it fits in a qr code

This commit is contained in:
raf 2023-09-11 01:22:28 +03:00
parent 136bd18f24
commit b92a7bdf86
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
6 changed files with 8 additions and 3 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
*.out
fetch

View file

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2023 Abhiraj Rik Copyright (c) 2023 NotAShelf
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View file

@ -3,10 +3,12 @@
it's tinyfetch but also tinier - you could probably fit this in a QR code it's tinyfetch but also tinier - you could probably fit this in a QR code
takes `0.001` to `0.003s` to fetch takes `0.001` to `0.003s` to fetch
edit: it fits in a [QR code](./assets/qr.png)
## depends ## depends
a compiler (I used g++) and `TERM`, `LANG`, `USER`, `SHELL` environmental variables to be set a compiler (I used g++) and `TERM`, `LANG`, `USER`, `SHELL` environmental variables to be set
## preview ## preview
![yeah](./preview.png) ![yeah](./assets/preview.png)

View file

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

BIN
assets/qr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,3 +1,4 @@
#include <iostream> #include <iostream>
#define e getenv #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";} #define p <<
int main() { std::cout p "\e[31muser:\e[0m " p e("USER") p "\n\e[32msh:\e[0m " p e("SHELL") p "\n\e[33mterm:\e[0m " p e("TERM") p "\n\e[34mlocale:\e[0m " p e("LANG") p "\n\x1b[35mcolors: \x1b[0m\x1b[41m \x1b[42m \x1b[43m \x1b[44m " "\x1b[45m \x1b[0m\n"; return 0;}