procfetch  0.3.0
A command-line system information utility written in C++
Functions
fetch.cpp File Reference
#include "fetch.h"
#include <mutex>
#include <pwd.h>
#include <string.h>
#include <unistd.h>
Include dependency graph for fetch.cpp:

Functions

string getuser ()
 
string gethostname (string path)
 
string getOS (string path)
 
string getHardwarePlatform ()
 
string getHost (string path)
 
string getKernel (string path)
 
string getUpTime (string path)
 
string getRAM (string path)
 
string getSHELL (string path)
 
string getDE ()
 
bool resCheck ()
 
string getRES (string path)
 
string getTheme ()
 
string getIcons ()
 
string getCPU (string path)
 
bool CpuTempCheck ()
 
int getCPUtemp (string path)
 
vector< string > getGPU ()
 
string getPackages ()
 
bool isCharging (string path)
 Utility to check if battery is charging or not. More...
 
void printBar (string status_path, int battery)
 Utility to print battery perecentage bar.
 
void printBattery (string path)
 
void printProcess (string art, string color_name)
 
void print (string color_name, string distro_name)
 

Function Documentation

◆ CpuTempCheck()

bool CpuTempCheck ( )
Returns
checks for CPUtemp file

◆ getCPU()

string getCPU ( string  path)
Returns
gets CPU info
Parameters
path

◆ getCPUtemp()

int getCPUtemp ( string  path)
Returns
gets CPU temp
Parameters
path

◆ getDE()

string getDE ( )
Returns
gets the Desktop Environment

◆ getGPU()

vector<string> getGPU ( )
Returns
gets vendor of Internal and External GPU

◆ getHardwarePlatform()

string getHardwarePlatform ( )
Returns
gets HardWare Platform

◆ getHost()

string getHost ( string  path)
Returns
gets Host
Parameters
path

◆ gethostname()

string gethostname ( string  path)
Returns
gets the hostname
Parameters
path

◆ getIcons()

string getIcons ( )
Returns
gets current Icon info

◆ getKernel()

string getKernel ( string  path)
Returns
gets kernel
Parameters
path

◆ getOS()

string getOS ( string  path)
Returns
gets name of Operating System
Parameters
path

◆ getPackages()

string getPackages ( )
Returns
gets count of all packages installed

◆ getRAM()

string getRAM ( string  path)
Returns
gets RAM usage details
Parameters
path

◆ getRES()

string getRES ( string  path)
Returns
gets current Screen Resolution
Parameters
path

◆ getSHELL()

string getSHELL ( string  path)
Returns
gets type of shell
Parameters
path

◆ getTheme()

string getTheme ( )
Returns
gets current Theme info

◆ getUpTime()

string getUpTime ( string  path)
Returns
get Uptime
Parameters
path

◆ getuser()

string getuser ( )
Returns
gets the username
Exceptions
runtime_errorfailed to get username

◆ isCharging()

bool isCharging ( string  path)

Utility to check if battery is charging or not.

Returns
status of battery

◆ print()

void print ( string  color_name,
string  distro_name 
)

Utility to print ascii art of Distro

Parameters
color_name
distro_name

◆ printBattery()

void printBattery ( string  path)
Returns
prints battery percentage bar
Parameters
path

◆ printProcess()

void printProcess ( string  art,
string  color_name 
)
Parameters
art
color_name

◆ resCheck()

bool resCheck ( )
Returns
checks for Resolution file