| 1 |
# <p align="center"> nmrs-tui 🦀 </p> |
| 2 |
|
| 3 |
<p align="center"> |
| 4 |
<strong>A fast, aesthetic, and Vim-friendly NetworkManager TUI built in Rust.</strong> |
| 5 |
</p> |
| 6 |
|
| 7 |
<p align="center"> |
| 8 |
<img src="https://img.shields.io/badge/status-heavy%20development-orange" alt="Status"> |
| 9 |
<img src="https://img.shields.io/badge/license-GPL--3-blue" alt="License"> |
| 10 |
<img src="https://img.shields.io/badge/built%20with-Ratatui-red" alt="Ratatui"> |
| 11 |
</p> |
| 12 |
|
| 13 |
--- |
| 14 |
> [!IMPORTANT] |
| 15 |
> `nmrs-tui` is currently in its early stages. Expect breaking changes and frequent updates as we move toward a stable release. |
| 16 |
|
| 17 |
`nmrs-tui` is a terminal user interface for [nmrs](https://github.com/cachebag/nmrs), inspired from [impala](https://github.com/pythops/impala). |
| 18 |
|
| 19 |
## ✨ Features |
| 20 |
- **Available Networks:** Real-time scanning and listing of WiFi networks. |
| 21 |
- **Known Networks:** Easily manage and connect to your saved profiles (WIP). |
| 22 |
- **Device Management:** View and control your network interfaces (WIP). |
| 23 |
- **Customizable:** (WIP). |
| 24 |
- **Vim-like Keybindings:** Navigate your networks with Vim-like keybinds. |
| 25 |
|
| 26 |
## 🚀 Installation |
| 27 |
|
| 28 |
### Prerequisites |
| 29 |
- **NetworkManager** must be installed and running. |
| 30 |
- **Rust** if you are building from source. |
| 31 |
|
| 32 |
### Build from Source |
| 33 |
```bash |
| 34 |
git clone https://github.com/y2w8/nmrs-tui.git |
| 35 |
cd nmrs-tui |
| 36 |
cargo build --release |
| 37 |
``` |
| 38 |
The binary will be available at `target/release/nmrs-tui`. |
| 39 |
|
| 40 |
## ⌨️ Keybindings |
| 41 |
| Key | Action | |
| 42 |
| ------------- | -------------- | |
| 43 |
| `Shift+Tab`/`Tab`/`h`/`l` | Switch between tabs (Known/Available/Devices) | |
| 44 |
| `↓`/`j` | Move selection down | |
| 45 |
| `↑`/`k` | Move selection up | |
| 46 |
| `Enter`/`Space` | Connect to selected network | |
| 47 |
| `Esc` | Cancel / Close popup | |
| 48 |
| `q` | Quit application | |
| 49 |
|
| 50 |
|
| 51 |
## 🛠️ Debugging & Logs |
| 52 |
If you encounter issues, `nmrs-tui` provides detailed logging. You can set the log level using the `RUST_LOG` environment variable: |
| 53 |
```bash |
| 54 |
RUST_LOG=debug nmrs-tui |
| 55 |
``` |
| 56 |
Logs are stored in your OS cache directory (e.g., `~/.cache/nmrs-tui/nmrs-tui.log`). |
| 57 |
|
| 58 |
## 🏗️ Project Structure |
| 59 |
|
| 60 |
- `src/main.rs`: Entry point. |
| 61 |
- `src/tui.rs`: Main loop. |
| 62 |
- `src/ui/`: UI components including `table`, `popup`, and `input` logic. |
| 63 |
- `src/events.rs`: Keyboard event handling and application logic. |
| 64 |
- `src/network_manager.rs`: Integration with the `nmrs` backend. |
| 65 |
- `src/logger.rs`: Logging implementation. |
| 66 |
|
| 67 |
## 🤝 Contributing |
| 68 |
|
| 69 |
Contributions are welcome! Whether it's a bug report, a new feature idea, or a pull request, feel free to open an issue or submit a PR. |