Skip to content

Cyxuan0311/FTB

Repository files navigation

FTB (Terminal File Browser)

C++17 FTXUI

Platform Tool

A terminal-based interactive file browser developed using FTXUI library, providing intuitive directory navigation and file viewing experience.

Demo

Demo

Features

  • 🗂️ Real-time directory content display
  • 🎨 Color-coded items (blue for directories/red for files)
  • ⏰ Top status bar with current time
  • 📁 Path history stack (support backward navigation)
  • ↕️ Keyboard navigation (↑↓ keys for selection, Enter to enter directories)
  • 🔄 Auto-refresh (100ms UI update interval)
  • 🔎 Directory search functionality
  • 🧑🎓 Memory usage calculation for selected items
  • 🛠️ File/folder creation and deletion
  • 👌 Attribute preview and file content inspection
  • 🗒️ Vim-Like editing mode

Dependencies

# Install FTXUI library
sudo apt-get install libftxui-dev

Build & Run

chmod +x ./build.sh
source ./build.sh      # Run build script
FTB             # Launch application

Uninstall(Local)

./uninstall.sh

Usage

  • ↑/↓: Navigate file list
  • Enter: Open selected directory
  • Backspace: Return to parent directory
  • ESC: Exit program
  • Search box: Filter files by keyword
  • Ctrl+f: Create new file
  • Ctrl+k: Create new directory
  • Delete: Remove selected item
  • Space: View item attributes
  • Ctrl+p: Preview file content (excluding binary files like .so, .o, .a)

Project Structure

FileBrowser/
├── include/FTB         # Header files
│   ├── FileManager.hpp
│   ├── ThreadGuard.hpp
|   |—— FileSizeCalculator.hpp
|   |—— Vim_Like.hpp
|   |—— DirectoryHistory.hpp
|   |—— detail_element.hpp
│   └── UIManager.hpp
├── src/                # Source code
│   ├── FileManager.cpp
|   |—— DirectoryHistory.cpp
|   |—— detail_element.cpp
│   ├── main.cpp
│   ├── ThreadGuard.cpp
|   |—— Vim_Like.cpp
|   |—— FileSizeCalculator.cpp
│   └── UIManager.cpp
├── tests/              # Test cases
│   |── UIManagerTest.cpp
|   |—— FileManagerTest.cpp
|   |—— main.cpp
|   |—— Vim_like_Test.cpp
|   |—— CMakeLists.txt
|   └── FileSizeCaculatorTest.cpp
|—— bash_tool/
|   |—— build.sh
|   |—— package_build.sh
|   |__ uninstall.sh
| 
|—— .github/workflows/
|   |__ Release.yml
├── CMakeLists.txt      # Build configuration
├── README.md           # Documentation
├── .gitignore
|—— Release_notes.md
|—— cmake_uninstall.cmake.in
├── .clang-format       # Code style
└── License

Development Environment

  • Compiler: g++ 11.0+
  • Build tool: CMake 3.20+
  • Dependency: FTXUI 5.0+

License

MIT License

About

The FTB is a file_brower based on FTXUI and Linux by C++ and CMake.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published