added readme and simplified make no source code was changed
sophuwu sophie@skisiel.com
Thu, 05 Dec 2024 07:31:48 +0100
5 files changed,
31 insertions(+),
57 deletions(-)
D
CMakeLists.txt
@@ -1,7 +0,0 @@
-cmake_minimum_required(VERSION 3.22) -project(sysgraph) - -set(CMAKE_CXX_STANDARD 17) - -add_executable(sysgraph main.cpp) -#target_link_libraries(sysgraph -static)
M
Makefile
→
Makefile
@@ -1,42 +1,2 @@
-ifeq ($(shell command -v cmake), ) -COMPCMD = g++ -o build/sysgraph main.cpp -COMPMSG = g++ -else -ifeq ($(shell command -v ninja), ) -COMPCMD = cmake -S . -B build && cmake --build build -COMPMSG = cmake -else -COMPCMD = cmake -GNinja -S . -B build && cmake --build build -COMPMSG = cmake and ninja -endif -CMAKELISTS = CMakeLists.txt -endif - -ifeq ($(shell command -v strip), ) -STRIPCMD = echo Strip not found. Binary size may be larger than expected. -else -STRIPCMD = strip --strip-all build/sysgraph -endif -ifeq ($(shell command -v upx), ) -UPXCMD = echo UPX not found. Binary size may be larger than expected. -else -UPXCMD = upx --best build/sysgraph -endif - -build: main.cpp $(CMAKELISTS) - @echo "Compiling with $(COMPMSG)" - @sleep 2 - @mkdir -p build - @$(COMPCMD) && $(STRIPCMD) && $(UPXCMD) && echo "Done! Run make test or make install then make clean" || echo "Failed!" - -clean: build - @rm -rf build - @echo "Cleaned up build directory." - -install: build/sysgraph - @echo Installing to /usr/local/bin/sysgraph - @sudo install build/sysgraph /usr/local/bin/sysgraph && echo "Done!" || echo "Failed! Try running as root." - -test: build/sysgraph - @echo "Running sysgraph" - @./build/sysgraph+sysgraph: main.cpp + g++ -o sysgraph --std=c++17 main.cpp
A
README.md
@@ -0,0 +1,28 @@
+# sysgraph +Really simple thingy that shows a graph of your cpu and ram usage on most linux distros. +### dependencies +depends on "libboost-dev" "g++" "make" +Debian/Ubuntu install dependencies: +```sh +sudo apt install libboost-dev build-essential +``` +### compile +```sh +make +``` +### install +```sh +sudo install ./build/sysgraph /usr/local/bin/sysgraph +``` +### Usage +Run `sysgraph` in a terminal to see the graph. Press `ctrl`+`c` to exit. +The graph will update every second. The graph shows in an alternate terminal buffer. +On exit with `ctrl`+`c` the program will exit safely and +the terminal will be restored to its previous state. + +### Screenshot +<img src="https://cdn.sophuwu.site/img/sysgraph.png" alt="sysgraph in a terminal"></img> + +### Note + +Temperature monitoring does not work on ARM processors. All AMD Ryezen and most Intel I series will work though.
D
pkg.yaml
@@ -1,5 +0,0 @@
-name: sysgraph -description: graphs cpu and ram use in the termianl -maintainer: sophuwu -homepage: github.com/sophuwu300/sysgraph -directory: /usr/local/bin