FORTRESS
A command-line file explorer written in modern Fortran with fzf integration.
Installation
From AUR (Arch Linux)
yay -S fortress
# or
paru -S fortress
Shell integration is automatically set up for bash and fish. Zsh users need to add to ~/.zshrc:
source /usr/share/fortress/fortress.sh
From Source
Prerequisites
- gfortran 10+ or ifort
- fpm (Fortran Package Manager)
Install fpm
# Using cargo (if you have Rust)
cargo install fpm
# Or download from GitHub releases
# https://github.com/fortran-lang/fpm/releases
Build & Run
# Build the project
fpm build
# Run FORTRESS
fpm run
# Or build and run in one command
fpm run --flag "-O2"
Shell Integration (Optional)
To enable the "cd on exit" feature (press 'c' to navigate your shell to a directory):
# Add to your .bashrc or .zshrc:
source /path/to/fortress/fortress.sh
# Then use:
fortress # instead of 'fpm run'
This allows you to navigate to directories and have your shell follow when you press 'c'.
Development
# Run tests
fpm test
# Build with debug flags
fpm build --flag "-g -Wall -Wextra"
Current Features
- ✅ Dual-pane display inspired by Ranger/MC (parent dir 30% | current dir 70%)
- ✅ Real filesystem navigation with directory reading
- ✅ Smart selection memory - remembers position when navigating
- ✅ Visual hierarchy - dimmed parent pane, active current pane
- ✅ Color-coded files:
- Directories: Blue + bold
- Executable files: Green
- Dotfiles: Grey
- Regular files: White
- ✅ Smooth updates - no flashing, selective redraws
- ✅ Arrow key navigation for intuitive movement
- ✅ Full-width selection bar - clean highlighting
- ✅ CD on exit - press 'c' to navigate your shell to selected directory
Next Steps
- File opening with $EDITOR (Enter on files)
- FZF integration for fuzzy search (Ctrl-F)
- File operations (copy, move, delete)
- Configuration file support
Roadmap
See ROADMAP.md for detailed development plans.
Controls
↑/↓: Navigate up/down→: Enter directory←: Go back to parent directoryc: CD to selected directory and exit (requires shell integration)q: Quit
Architecture
FORTRESS is built as a self-contained file explorer:
app/main.f90: Main application with integrated UI and file operationslib_modules/: Modular components (available for future expansion)filesystem/: File operations and directory walkingterminal/: Terminal I/O and screen managementui/: User interface components (panes, rendering)
Packaging
For AUR maintainers, see AUR_PACKAGING.md for complete packaging instructions.
License
MIT
View source
| 1 | # FORTRESS |
| 2 | |
| 3 | A command-line file explorer written in modern Fortran with fzf integration. |
| 4 | |
| 5 | ## Installation |
| 6 | |
| 7 | ### From AUR (Arch Linux) |
| 8 | |
| 9 | ```bash |
| 10 | yay -S fortress |
| 11 | # or |
| 12 | paru -S fortress |
| 13 | ``` |
| 14 | |
| 15 | Shell integration is automatically set up for bash and fish. Zsh users need to add to `~/.zshrc`: |
| 16 | ```bash |
| 17 | source /usr/share/fortress/fortress.sh |
| 18 | ``` |
| 19 | |
| 20 | ### From Source |
| 21 | |
| 22 | #### Prerequisites |
| 23 | |
| 24 | - gfortran 10+ or ifort |
| 25 | - fpm (Fortran Package Manager) |
| 26 | |
| 27 | ### Install fpm |
| 28 | |
| 29 | ```bash |
| 30 | # Using cargo (if you have Rust) |
| 31 | cargo install fpm |
| 32 | |
| 33 | # Or download from GitHub releases |
| 34 | # https://github.com/fortran-lang/fpm/releases |
| 35 | ``` |
| 36 | |
| 37 | ### Build & Run |
| 38 | |
| 39 | ```bash |
| 40 | # Build the project |
| 41 | fpm build |
| 42 | |
| 43 | # Run FORTRESS |
| 44 | fpm run |
| 45 | |
| 46 | # Or build and run in one command |
| 47 | fpm run --flag "-O2" |
| 48 | ``` |
| 49 | |
| 50 | ### Shell Integration (Optional) |
| 51 | |
| 52 | To enable the "cd on exit" feature (press 'c' to navigate your shell to a directory): |
| 53 | |
| 54 | ```bash |
| 55 | # Add to your .bashrc or .zshrc: |
| 56 | source /path/to/fortress/fortress.sh |
| 57 | |
| 58 | # Then use: |
| 59 | fortress # instead of 'fpm run' |
| 60 | ``` |
| 61 | |
| 62 | This allows you to navigate to directories and have your shell follow when you press 'c'. |
| 63 | |
| 64 | ### Development |
| 65 | |
| 66 | ```bash |
| 67 | # Run tests |
| 68 | fpm test |
| 69 | |
| 70 | # Build with debug flags |
| 71 | fpm build --flag "-g -Wall -Wextra" |
| 72 | ``` |
| 73 | |
| 74 | ## Current Features |
| 75 | |
| 76 | - ✅ **Dual-pane display** inspired by Ranger/MC (parent dir 30% | current dir 70%) |
| 77 | - ✅ **Real filesystem navigation** with directory reading |
| 78 | - ✅ **Smart selection memory** - remembers position when navigating |
| 79 | - ✅ **Visual hierarchy** - dimmed parent pane, active current pane |
| 80 | - ✅ **Color-coded files**: |
| 81 | - Directories: Blue + bold |
| 82 | - Executable files: Green |
| 83 | - Dotfiles: Grey |
| 84 | - Regular files: White |
| 85 | - ✅ **Smooth updates** - no flashing, selective redraws |
| 86 | - ✅ **Arrow key navigation** for intuitive movement |
| 87 | - ✅ **Full-width selection bar** - clean highlighting |
| 88 | - ✅ **CD on exit** - press 'c' to navigate your shell to selected directory |
| 89 | |
| 90 | ## Next Steps |
| 91 | |
| 92 | - [ ] File opening with $EDITOR (Enter on files) |
| 93 | - [ ] FZF integration for fuzzy search (Ctrl-F) |
| 94 | - [ ] File operations (copy, move, delete) |
| 95 | - [ ] Configuration file support |
| 96 | |
| 97 | ## Roadmap |
| 98 | |
| 99 | See [ROADMAP.md](ROADMAP.md) for detailed development plans. |
| 100 | |
| 101 | ## Controls |
| 102 | |
| 103 | - `↑/↓`: Navigate up/down |
| 104 | - `→`: Enter directory |
| 105 | - `←`: Go back to parent directory |
| 106 | - `c`: CD to selected directory and exit (requires shell integration) |
| 107 | - `q`: Quit |
| 108 | |
| 109 | ## Architecture |
| 110 | |
| 111 | FORTRESS is built as a self-contained file explorer: |
| 112 | |
| 113 | - `app/main.f90`: Main application with integrated UI and file operations |
| 114 | - `lib_modules/`: Modular components (available for future expansion) |
| 115 | - `filesystem/`: File operations and directory walking |
| 116 | - `terminal/`: Terminal I/O and screen management |
| 117 | - `ui/`: User interface components (panes, rendering) |
| 118 | |
| 119 | ## Packaging |
| 120 | |
| 121 | For AUR maintainers, see [AUR_PACKAGING.md](AUR_PACKAGING.md) for complete packaging instructions. |
| 122 | |
| 123 | ## License |
| 124 | |
| 125 | MIT |