Changing to FTXUI for a more robust and user friendly TUI

This commit is contained in:
mrkmntal 2026-02-25 12:14:34 -05:00
commit f246138083
6 changed files with 1198 additions and 338 deletions

View file

@ -20,7 +20,9 @@ jobs:
- name: Compile tux-dock
run: |
g++ -std=c++17 main.cpp -o tux-dock
cmake -S . -B build
cmake --build build -j
cp build/tux-dock ./tux-dock
chmod +x tux-dock
echo "🎉 tux-dock compiled and marked executable!"
@ -42,4 +44,3 @@ jobs:
name: tux-dock-linux-x86_64-${{ env.BRANCH }}-${{ env.COMMIT }}
path: tux-dock-linux-x86_64-${{ env.BRANCH }}-*.tar.gz

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
build/

30
CMakeLists.txt Normal file
View file

@ -0,0 +1,30 @@
cmake_minimum_required(VERSION 3.16)
project(tux-dock LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
include(FetchContent)
set(FTXUI_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(FTXUI_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(FTXUI_BUILD_TESTS OFF CACHE BOOL "" FORCE)
FetchContent_Declare(
ftxui
GIT_REPOSITORY https://github.com/ArthurSonzogni/FTXUI.git
GIT_TAG v5.0.0
)
FetchContent_MakeAvailable(ftxui)
add_executable(tux-dock main.cpp)
target_link_libraries(tux-dock
PRIVATE
ftxui::screen
ftxui::dom
ftxui::component
)

View file

@ -24,6 +24,7 @@ It offers a clean, interactive menu for common Docker operations like pulling im
- **C++17 or newer** compiler
(e.g., `g++`, `clang++`)
- **CMake 3.16+**
- **Docker Engine** installed and running
(tested on Debian 12/13, Alpine Linux, and Arch Linux)
@ -36,12 +37,13 @@ It offers a clean, interactive menu for common Docker operations like pulling im
git clone https://mentalnet.xyz/forgejo/markmental/tuxdock.git
cd tuxdock
# Build the binary
g++ -std=c++17 main.cpp -o tux-dock
# Configure & build (FTXUI is fetched automatically)
cmake -S . -B build
cmake --build build -j
# Run it (requires Docker permissions)
sudo ./tux-dock
````
sudo ./build/tux-dock
```
Prefer a prebuilt binary? The CI runner publishes build artifacts for the latest commits at:
https://mentalnet.xyz/forgejo/markmental/tuxdock/actions

View file

@ -1,3 +1,3 @@
#!/bin/sh
g++ -std=c++17 main.cpp -o tux-dock && echo "tux-dock successfully compiled!"
cmake -S . -B build && cmake --build build -j && echo "tux-dock successfully compiled!"

1482
main.cpp

File diff suppressed because it is too large Load diff