Alex
Alex is a simple ncurses-based text pager written in C++.
It allows you to view text files page by page in a terminal,
with support for navigation, text wrapping, and customizable colors.
Features
- Wraps long lines based on terminal width (configurable)
- Preserves indentation and empty lines
- Navigation:
- Left/Right arrow keys: Previous/Next page
- Up/Down arrow keys: Jump to Start/End
q: Quitb/t: Cycle through background and text colors
- Centered display with equal margins
Requirements
- C++17 or later
ncurseslibraryCMake(for building)
Installation
Linux/macOS
- Install
ncursesif not already installed:sudo apt install libncurses5-dev # Debian/Ubuntu sudo dnf install ncurses-devel # Fedora brew install ncurses # macOS (Homebrew)
- Clone the repository and build the project:
git clone https://github.com/iaseth/alex cd alex mkdir build && cd build cmake .. make
- Run the program:
./alex <filename> [max_width]
Usage
./alex example.txt 80- This command opens
example.txtwith a max text width of 80 characters.
License
This project is licensed under the MIT License.