## 🐉 Fafnir – Project Overview

**Project Name:** Fafnir

**Goal:**
Fafnir is a **minimal, mouse-first terminal multiplexer** optimized for **SSH workflows**, designed to manage multiple terminal sessions and tabs **entirely via mouse interaction**. It uses a **bottom status bar** with clickable tabs and a **Dragon Menu** for all session operations, emphasizing **simplicity and clarity**.

---

### Core Features

1. **Bottom Bar UI**

   * Full-width **light-blue background** at the bottom of the terminal.
   * Left-most **🐉 button** opens the Dragon Menu.
   * **Tabs integrated into the bar**; clicking switches active panes.
   * Optional **status/info** on the right, e.g., current session name.

2. **Dragon Menu**

   * Mouse-driven menu for all actions:

     * **New Tab** – create a new tab in the current session.
     * **New Session** – start a new session.
     * **List Sessions** – switch between existing sessions.
     * **Detach** – detach the current session; handled by a **background process**.
     * **Exit** – quit Fafnir (menu-only exit).
   * No keyboard shortcuts are used; **all interactions are via mouse clicks**.

3. **Tab Management**

   * Each tab runs a **fully functional PTY** for real shell integration.
   * Clickable tabs highlight the active tab.
   * Tab content is displayed in the main terminal area above the bottom bar.

4. **Session Management**

   * Supports multiple sessions, each with multiple tabs.
   * Detaching sessions runs them in the background to allow safe SSH disconnects.
   * Sessions can be reattached later via the Dragon Menu.

5. **Minimalist Design Philosophy**

   * **No borders, no top bar, no themes**—just the **clean bottom bar**.
   * Focused on **mouse-driven, distraction-free interaction**.

---

### Technology Stack

* **Rust** – core programming language for performance and safety.
* **Crossterm** – terminal I/O and mouse events.
* **Ratatui** – terminal UI rendering for dynamic widgets.
* **PTY integration** – each tab runs a real shell.

---

### Target Use Case

* Remote SSH environments where **keyboard-heavy multiplexers** feel cumbersome.
* Users who want **mouse-first session and tab management**.
* Developers who need a **detachable, minimal, PTY-backed terminal multiplexer**.

---

**Summary:**
Fafnir is a **mouse-driven, PTY-backed terminal multiplexer** with **clickable tabs** and a **Dragon Menu** in a **single bottom bar**. Detachable sessions run as **background processes**, ensuring SSH disconnections don’t interrupt work. Its design prioritizes **simplicity, visual clarity, and seamless remote workflow**.