tanmaypatil105 / procfetch Goto Github PK
View Code? Open in Web Editor NEW🎨 A command-line system information utility written in C++
Home Page: https://tanmaypatil105.github.io/procfetch/
License: GNU General Public License v3.0
🎨 A command-line system information utility written in C++
Home Page: https://tanmaypatil105.github.io/procfetch/
License: GNU General Public License v3.0
Instead of printing ascii art of EndeavourOS
it prints Default
ascii art.
[[email protected] procfetch]$ procfetch
__ _
/ / (_)____ __ __ _ __
/ / / // __ \ / / / /| |/_/
/ /___ / // / / // /_/ /_> <
/_____//_//_/ /_/ \__,_//_/|_|
liveuser@#
OS : x86_64
Host : VirtualBox 1.2
Kernel : 5.15.8-arch1-1
UpTime : 1 mins
RAM : 825MiB / 1976MiB
shell : bash
/etc/os-release
[[email protected] procfetch]$ cat /etc/os-release
NAME='EndeavourOS'
PRETTY_NAME='EndeavourOS'
ID=endeavouros
ID_LIKE=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL='https://endeavouros.com'
DOCUMENTATION_URL='https://discovery.endeavouros.com'
SUPPORT_URL='https://forum.endeavouros.com'
BUG_REPORT_URL='https://forum.endeavouros.com/c/arch-based-related-questions/bug-reports'
LOGO=endeavouros
IMAGE_ID=endeavouros
IMAGE_VERSION=2021.12.17
Print battery percentage
If all the documents in the docs/ directory are generated by doxygen, why not delete them?
The procfetch.gif doesn't get displayed at https://tanmaypatil105.github.io/procfetch/index.html.
Fix : We just need to put the procfetch.gif on the new branch. I have fixed it by creating a directory images/ on the gh-pages branch and placing the procfetch.gif in it. Is that the right way or you prefer another way of doing it?
❯ procfetch
tanmay@tanmay-lenovo
OS : Ubuntu 20.04.5 LTS x86_64
Host : 81DE Lenovo ideapad 330-15IKB
Kernel : 5.15.0-60-generic
UpTime : 22 hours, 41 mins
RAM : 2615MiB / 7857MiB
shell : zsh
DE : ubuntu:GNOME
Resolution : 1366x768
Theme : Yaru
Icons : Yaru
CPU : Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
CPU Temperature : 40 °C
GPU : Intel Corporation UHD Graphics 620
GPU : NVIDIA Corporation GP108M [GeForce MX150]
Packages : 2155 dpkg; 169 brew; 15 snap; 6 flatpak; 3 npm;
🔋 36% [==================>-------------------------------]
[[email protected] src]$ procfetch
__ _
/ / (_)____ __ __ _ __
/ / / // __ \ / / / /| |/_/
/ /___ / // / / // /_/ /_> <
/_____//_//_/ /_/ \__,_//_/|_|
liveuser@#
OS : x86_64
Host : VirtualBox 1.2
Kernel : 5.15.8-arch1-1
UpTime : 15 mins
RAM : 809MiB / 1976MiB
shell : bash
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
Aborted (core dumped)
[[email protected] src]$ procfetch
__ _
/ / (_)____ __ __ _ __
/ / / // __ \ / / / /| |/_/
/ /___ / // / / // /_/ /_> <
/_____//_//_/ /_/ \__,_//_/|_|
liveuser@#
OS : x86_64
Host : VirtualBox 1.2
Kernel : 5.15.8-arch1-1
UpTime : 10 mins
RAM : 801MiB / 1976MiB
shell : bash
Resolution : 800x600
Theme : Adwaita
Icons : Adwaita
CPU : Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
GPU : VMware SVGA II Adapter
Packages : 888 pacman;
Why not enable Github Discussions to discuss topics like Issue #30?
adding yml files required for travis CI or GitHub actions to test it on multiple cpu architectures (ubuntu for os)
CPUs:
os:
(u can specify more archs /os)( i assuming it will work fine in wsl 2 if it works if in amd64 .(maybe)
ill be back in 3 days before that if anyone wants this issue u can assign to them :)
Update /images/procfetch.gif
everytime there is a release or a feature update.
gif
goal to MakefileWe are using vhs to generate gifs.
Changed to run the build process when install.sh is invoked.
Failed to build the docker image procfetch
.
Execute the following:
$ docker build -t procfetch .
No Error.
$ docker build -t procfetch .
[+] Building 2.0s (6/8) docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 471B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:latest 1.7s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 112B 0.0s
=> [1/5] FROM docker.io/library/ubuntu:latest@sha256:3f85b7caad41a95462cf5b787d8a04604c8262cdcdf9a472b8c52ef83375fe15 0.0s
=> CACHED [2/5] RUN apt-get update && apt-get install -y --no-install-recommends sudo make g++ gdb clang-format doxygen graphviz && apt-get -y clean && rm -rf /v 0.0s
=> ERROR [3/5] RUN adduser --disabled-password --gecos '' user 0.2s
------
> [3/5] RUN adduser --disabled-password --gecos '' user:
0.187 /bin/sh: 1: adduser: not found
------
Dockerfile:14
--------------------
12 | rm -rf /var/lib/apt/lists/*
13 |
14 | >>> RUN adduser --disabled-password --gecos '' user
15 | RUN echo 'user ALL=(root) NOPASSWD:ALL' > /etc/sudoers.d/user
16 |
--------------------
ERROR: failed to solve: process "/bin/sh -c adduser --disabled-password --gecos '' user" did not complete successfully: exit code: 127
Recently, I removed /home/linuxbrew/.linuxbrew/bin/
from PATH
Since, brew
still exists as a binary and we check if Path::of("/home/linuxbrew/.linuxbrew/bin/brew"s).isExecutable()
and execute brew list | { tr '' '\n'; }
__ __ __ __
/ / / // /_ __ __ ____ / /_ __ __
/ / / // __ \ / / / // __ \ / __// / / /
/ /_/ // /_/ // /_/ // / / // /_ / /_/ /
\____//_.___/ \__,_//_/ /_/ \__/ \__,_/
tanmay@tanmay-lenovo
OS : Ubuntu 23.04 x86_64
Host : 81DE Lenovo ideapad 330-15IKB
Kernel : 6.2.0-34-generic
UpTime : 1 d, 14 hours, 37 mins
RAM : 3033MiB / 7840MiB
shell : zsh
DE : ubuntu:GNOME
Resolution : 1366x768
Theme : Yaru-viridian-dark
Icons : Yaru-viridian-dark
CPU : Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
CPU Temperature : 36.5 °C
GPU : Intel Corporation UHD Graphics 620
GPU : NVIDIA Corporation GP108M [GeForce MX150]
+sh: 1: brew: not found
Packages : 3243 dpkg; 40 flatpak; 23 snap; 3 npm; 0 brew; 0 rpm;
🔋 62% [===============================>------------------]
Let's discuss the introduction of code formatter.
Should line wrapping be enforced?
If so, how many columns?
The program currently only fetches GNOME
theme information.
Theme information for KDE, MATE etc.. can be added!
extract every function into a separate files.
The following warnings occur at compile time.
fetch.cpp: In function ‘bool CpuTempCheck(std::string)’:
fetch.cpp:246:26: warning: unused parameter ‘path’ [-Wunused-parameter]
246 | bool CpuTempCheck(string path)
| ~~~~~~~^~~~
execute a following command.
$ make
Mac compiler warnings.
Run make
/Applications/Xcode_13.2.1.app/Contents/Developer/usr/bin/make -C src
c++ -std=c++2a -Wall --pedantic-errors -c -o fetch.o fetch.cpp
fetch.cpp:[5](https://github.com/TanmayPatil105/procfetch/actions/runs/3220774539/jobs/5267901619#step:3:6)[7](https://github.com/TanmayPatil105/procfetch/actions/runs/3220774539/jobs/5267901619#step:3:8)5:28: warning: braces around scalar initializer [-Wbraced-scalar-init]
ascii_arts["Ubuntu"] = {"ubuntu.ascii"};
^~~~~~~~~~~~~~~~
Currently, the program doesn't handle exceptions and it halts. I'm listing some failures here that I have experienced.
string getuser()
{
return getenv("USER");
}
See discussion on #145!
string getTheme()
{
auto args = "gsettings get org.gnome.desktop.interface gtk-theme"s;
auto s = Command::exec(args)->getOutput();
return s.substr(1, s.find("\'", 1) - 1);
}
Some machines don't have it installed. For example, Docker containers.
string getIcons()
{
auto args = "gsettings get org.gnome.desktop.interface icon-theme"s;
auto s = Command::exec(args)->getOutput();
return s.substr(1, s.find("\'", 1) - 1);
}
Same as above
procfetch -b
doesn't work on my machine.
I am working on the fix. Will update soon.
While displaying packages, the following error occurred!
npm ERR! code ELSPROBLEMS
npm ERR! missing: @code-hike/mdx@^0.7.4, required by [email protected]
npm ERR! missing: @mdx-js/react@^2.1.1, required by [email protected]
npm ERR! missing: @types/json-stringify-safe@^5.0.0, required by [email protected]
npm ERR! missing: common@file:/home/tanmay/Documents/supabase/packages/common, required by [email protected]
npm ERR! missing: config@file:/home/tanmay/Documents/supabase/packages/config, required by [email protected]
npm ERR! missing: docs@file:/home/tanmay/Documents/supabase/apps/docs, required by [email protected]
npm ERR! missing: eslint-config-custom@*, required by [email protected]
npm ERR! missing: eslint@^7.32.0, required by [email protected]
npm ERR! missing: json-stringify-safe@^5.0.1, required by [email protected]
npm ERR! missing: mdx-mermaid@^1.3.2, required by [email protected]
npm ERR! missing: mermaid@^9.2.2, required by [email protected]
npm ERR! missing: mini-svg-data-uri@^1.4.4, required by [email protected]
npm ERR! missing: prettier@^2.5.1, required by [email protected]
npm ERR! missing: shared-data@file:/home/tanmay/Documents/supabase/packages/shared-data, required by [email protected]
npm ERR! missing: studio@file:/home/tanmay/Documents/supabase/studio, required by [email protected]
npm ERR! missing: supabase-tests@file:/home/tanmay/Documents/supabase/tests, required by [email protected]
npm ERR! missing: ts-jest@^27.0.7, required by [email protected]
npm ERR! missing: tsconfig@file:/home/tanmay/Documents/supabase/packages/tsconfig, required by [email protected]
npm ERR! missing: turbo@^1.4.7, required by [email protected]
npm ERR! missing: ui@file:/home/tanmay/Documents/supabase/packages/ui, required by [email protected]
npm ERR! missing: www@file:/home/tanmay/Documents/supabase/apps/www, required by [email protected]
npm ERR! A complete log of this run can be found in:
npm ERR! /home/tanmay/.npm/_logs/2023-01-03T11_36_29_441Z-debug-0.log
Although,
Packages still got displayed
Packages : 2340 dpkg; 15 snap; 23 npm; 43 brew;
just trying to match-up formats of rest of parameters
Shouldn't we remove the -C
option from the configure
script because we no longer plan to use it?
The -C option was intended to be used by the package manager Homebrew, but as a result, the --prefix option is used instead.
Currently the application does not get CPU temps from AMD CPUs (tested on Pop!_OS). I've figured out a way to implement this feature. Can I work on this issue?
__ __ __ __
/ / / // /_ __ __ ____ / /_ __ __
/ / / // __ \ / / / // __ \ / __// / / /
/ /_/ // /_/ // /_/ // / / // /_ / /_/ /
\____//_.___/ \__,_//_/ /_/ \__/ \__,_/
txnmxy@txnmxy-VirtualBox
OS : Ubuntu 20.04.4 LTS x86_64
Host : VirtualBox 1.2
Kernel : 5.15.91
UpTime : 5 mins
RAM : 774MiB / 2988MiB
shell : bash
DE : ubuntu:GNOME
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr: __pos (which is 2) > this->size() (which is 0)
Aborted (core dumped)
Kindly assign me this issue so that I can add logo of deepin, kaios, pureos & zorin os.
Add dist
goal to Makefile to generate distribution.
distribution file name:
procfetch-v0.0.1.tar.gz
Originally posted by youpong February 13, 2023
clang-15 supports std::format similar to Python3's f-Strings.
Why not use it?
The following methods might help reduce the image size.
The second method would require some changes to the Makefile if coverage testing is to be done on the image.
I want to add ascii art for Pop!_OS, Gentoo, Elementary OS, Slackware, Asahi Linux, Peppermint OS, and more that I can find. Can you assign me this issue?
The output displayed after running procfetch command is in a single column right now.
It needs to be displayed in such a way that the acii art should appear in the left and the fetched information on the right.
at fetch.cpp:308
if (Path::of("/bin/emerge"s).is_regular_fie()) // gentoo
{
string portage = exec("echo -n $(cd /var/db/pkg && ls -d */* | wc -l");
pkg += portage.substr(0, portage.size() - 1) + RED + " portage; " + RESET;
}
When exec function are executed, the following error occurs internally and the expected value is not obtained.
sh: 1: Syntax error: end of file unexpected (expecting ")")
Add warning option to compiler. Then fix these warned.
==> ./configure --prefix=/home/linuxbrew/.linuxbrew/Cellar/procfetch/0.2.1
==> make install
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /home/linuxbrew/.linuxbrew
Could not symlink share/procfetch/ascii/arch.ascii
Target /home/linuxbrew/.linuxbrew/share/procfetch/ascii/arch.ascii
already exists. You may want to remove it:
rm '/home/linuxbrew/.linuxbrew/share/procfetch/ascii/arch.ascii'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.