Skip to content

hakmarkdev/moon-commander

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moon Commander v1.0.0

Moon Commander is a modern, Rust-based terminal file manager designed for efficiency and speed. It features a classic dual-pane interface, robust file operations, and a built-in text editor with syntax highlighting.

Features

  • Dual-Pane Interface: Navigate two directories simultaneously for easy file management.
  • File Operations:
    • Copy (F5): Copy files and directories (recursive).
    • Move (F6): Move and rename files and directories.
    • Mkdir (F7): Create new directories.
    • Delete (F8): Delete files and directories.
    • New File (F2): Create empty files.
  • Built-in Editor (F4):
    • Syntax highlighting for major languages.
    • Undo/Redo support (Ctrl+U/Z, Ctrl+Y).
    • Line operations (Insert, Delete).
    • Modal interface (Exit with ESC).
  • Navigation:
    • Arrow keys for movement.
    • PageUp/PageDown for fast scrolling.
    • Enter to open directories or edit files.
    • Backspace to go to parent directory.
    • Tab to switch panels.
  • Modal Dialogs: Interactive dialogs for all major operations.

Project Structure

The codebase is organized into modular components:

  • src/app/: Core application logic and state management.
    • mod.rs: Main event loop and application entry point.
    • state.rs: Manages global application state (panels, dialogs, etc.).
    • events.rs: Event definitions and handling.
    • config.rs: Configuration management.
  • src/filesystem/: File system abstraction and operations.
    • operations.rs: Implementation of Copy, Move, Delete, Create.
    • entries.rs: File entry definitions.
    • watcher.rs: File system monitoring.
  • src/editor/: The built-in text editor.
    • editor.rs: Main editor logic and event handling.
    • editor_state.rs: Manages text content, cursor, and history.
    • syntax.rs: Syntax highlighting implementation.
    • version_history.rs: Undo/Redo stack implementation.
  • src/ui/: User interface rendering using ratatui.
    • layout.rs: Main layout definition.
    • components/: Reusable UI components (Panel, Dialog).
  • src/utils/: Utility functions (error handling, path manipulation).

Getting Started

Prerequisites

  • Rust (latest stable version)
  • Cargo

Installation

Clone the repository:

git clone https://github.com/yourusername/moon-commander.git
cd moon-commander

Running

Run the application using Cargo:

cargo run

Key Bindings

Key Action
F1 Help
F2 New File
F4 Edit File
F5 Copy
F6 Move
F7 Make Directory
F8 Delete
F10 Quit
Tab Switch Panel
Esc Close Dialog / Exit Editor

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Moon Commander is a modern, Rust-based terminal file manager designed for efficiency and speed.

Topics

Resources

Stars

Watchers

Forks

Languages