visualizations

Programmatic visualizations
git clone git://git.laack.co/visualizations.git
Log | Files | Refs | README

commit fcb39074bd2b127c198ec9044b23ea7a1b343c61
parent a3f2f770ed90a025ca8044a2fb33bf0cec2170e9
Author: Andrew Laack <andrew@laack.co>
Date:   Tue, 15 Sep 2026 11:50:24 -0500

Broke out background logic, tried some stuff with that using execlp and boost process that didn't work, leaving for now

Diffstat:
Mbackground/Makefile | 6+++---
Mbackground/README | 2+-
Abackground/headers/background.hpp | 4++++
Abackground/src/background.cpp | 6++++++
Mbackground/src/main.cpp | 6+-----
5 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/background/Makefile b/background/Makefile @@ -1,13 +1,13 @@ build: - g++ -Ofast src/main.cpp src/prim.cpp src/graph.cpp src/edge.cpp src/utils.cpp src/vertex.cpp -lraylib -o background + g++ -Ofast src/main.cpp src/prim.cpp src/graph.cpp src/edge.cpp src/utils.cpp src/vertex.cpp src/background.cpp -lraylib -o background install: build cp background /usr/local/bin clean: rm background test: - g++ tests/graph_test.cpp src/prim.cpp src/graph.cpp src/edge.cpp src/utils.cpp src/vertex.cpp -lCatch2Main -lCatch2 -lraylib -o graph_tests + g++ tests/graph_test.cpp src/prim.cpp src/graph.cpp src/edge.cpp src/utils.cpp src/vertex.cpp src/background.cpp -lCatch2Main -lCatch2 -lraylib -o graph_tests ./graph_tests rm graph_tests - g++ tests/algo_test.cpp src/prim.cpp src/graph.cpp src/edge.cpp src/utils.cpp src/vertex.cpp -lCatch2Main -lCatch2 -lraylib -o algo_tests + g++ tests/algo_test.cpp src/prim.cpp src/graph.cpp src/edge.cpp src/utils.cpp src/vertex.cpp src/background.cpp -lCatch2Main -lCatch2 -lraylib -o algo_tests ./algo_tests rm algo_tests diff --git a/background/README b/background/README @@ -4,4 +4,4 @@ background dependencies ============ -X11, feh, raylib, g++ +X11, feh (on $PATH), raylib, g++ diff --git a/background/headers/background.hpp b/background/headers/background.hpp @@ -0,0 +1,4 @@ +#pragma once + +#include <string> +void setBackground(std::string filePath); diff --git a/background/src/background.cpp b/background/src/background.cpp @@ -0,0 +1,6 @@ +#include <string> + +void setBackground(std::string filePath) { + std::string command = "/usr/bin/feh --no-fehbg --bg-scale " + filePath; + system(command.c_str()); +} diff --git a/background/src/main.cpp b/background/src/main.cpp @@ -1,5 +1,6 @@ #include "../headers/graph.hpp" #include "../headers/prim.hpp" +#include "../headers/background.hpp" #include <cstdlib> #include <unistd.h> #include <raylib.h> @@ -8,11 +9,6 @@ #include <unordered_set> #include <filesystem> -void setBackground(std::string filePath) { - std::string command = "/usr/bin/feh --no-fehbg --bg-scale " + filePath; - const char* fp = command.c_str(); - system(fp); -} void customTakeScreenshot(char* filePath){ const char *customParam;