Changing to FTXUI for a more robust and user friendly TUI
This commit is contained in:
parent
40bac1987a
commit
f246138083
6 changed files with 1198 additions and 338 deletions
|
|
@ -20,7 +20,9 @@ jobs:
|
||||||
|
|
||||||
- name: Compile tux-dock
|
- name: Compile tux-dock
|
||||||
run: |
|
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
|
chmod +x tux-dock
|
||||||
echo "🎉 tux-dock compiled and marked executable!"
|
echo "🎉 tux-dock compiled and marked executable!"
|
||||||
|
|
||||||
|
|
@ -42,4 +44,3 @@ jobs:
|
||||||
name: tux-dock-linux-x86_64-${{ env.BRANCH }}-${{ env.COMMIT }}
|
name: tux-dock-linux-x86_64-${{ env.BRANCH }}-${{ env.COMMIT }}
|
||||||
path: tux-dock-linux-x86_64-${{ env.BRANCH }}-*.tar.gz
|
path: tux-dock-linux-x86_64-${{ env.BRANCH }}-*.tar.gz
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
build/
|
||||||
30
CMakeLists.txt
Normal file
30
CMakeLists.txt
Normal 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
|
||||||
|
)
|
||||||
10
README.md
10
README.md
|
|
@ -24,6 +24,7 @@ It offers a clean, interactive menu for common Docker operations like pulling im
|
||||||
|
|
||||||
- **C++17 or newer** compiler
|
- **C++17 or newer** compiler
|
||||||
(e.g., `g++`, `clang++`)
|
(e.g., `g++`, `clang++`)
|
||||||
|
- **CMake 3.16+**
|
||||||
- **Docker Engine** installed and running
|
- **Docker Engine** installed and running
|
||||||
(tested on Debian 12/13, Alpine Linux, and Arch Linux)
|
(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
|
git clone https://mentalnet.xyz/forgejo/markmental/tuxdock.git
|
||||||
cd tuxdock
|
cd tuxdock
|
||||||
|
|
||||||
# Build the binary
|
# Configure & build (FTXUI is fetched automatically)
|
||||||
g++ -std=c++17 main.cpp -o tux-dock
|
cmake -S . -B build
|
||||||
|
cmake --build build -j
|
||||||
|
|
||||||
# Run it (requires Docker permissions)
|
# 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:
|
Prefer a prebuilt binary? The CI runner publishes build artifacts for the latest commits at:
|
||||||
https://mentalnet.xyz/forgejo/markmental/tuxdock/actions
|
https://mentalnet.xyz/forgejo/markmental/tuxdock/actions
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/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!"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue