Skip to content

DevNexe/NoxIDE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NoxIDE

A lightweight code editor built entirely in Python

Python PyQt5 Platform License

A VS Code-inspired editor that you own completely — readable, hackable, extensible.


Overview

NoxIDE is a desktop code editor written in Python with PyQt5. It features a tabbed code editor with Python syntax highlighting, an integrated PTY terminal, a file explorer, session persistence, and a clean dark UI that mirrors VS Code's layout — built without Electron, without Node.js, without any bloat.

┌─────────────────────────────────────────────────────────────────────┐
│  🗁  NoxIDE         File  Edit  View         [⊟] [ꓸ] [𝕏]  ⊟  □  ✕ │
├────┬────────────────────────────────────────────────────────────────┤
│    │  main.py ×   utils.py ×   Untitled ×                          │
│ 🗂 ├────────────────────────────────────────────────────────────────┤
│    │   1  # main.py                                                 │
│ 🔍 │   2  import sys                                                │
│    │   3  from PyQt5.QtWidgets import QApplication                  │
│ ⚙  │   4                                                            │
│    │   5  def main():                                               │
│    │   6      app = QApplication(sys.argv)                          │
│    ├────────────────────────────────────────────────────────────────┤
│    │  PS C:\project> python main.py                                 │
│    │  NoxIDE started                                                │
└────┴────────────────────────────────────────────────────────────────┘

Features

Editor

  • Tabbed editing with QTabWidget — movable tabs, close buttons, unsaved indicator
  • Line numbers with accurate pixel alignment
  • Python syntax highlighting — keywords, strings, comments, function names
  • Ctrl+Scroll zoom, Ctrl+0 reset
  • Custom animated scrollbars — fade in on scroll, fade out on idle
  • Smart encoding detection: UTF-8, UTF-8 BOM, UTF-16, Windows-1251, Latin-1
  • Re-decode open file in a different encoding without reopening

File Explorer

  • QFileSystemModel-backed tree view — open any folder as project root
  • Double-click to open files in a new tab
  • Auto-detects encoding on load, reports invalid chars in status bar

Integrated Terminal

  • Real PTY via winpty — runs PowerShell (or bash on Linux/macOS)
  • Full key support: arrows, Tab completion, Ctrl+C/D, Ctrl+Shift+V paste
  • pyte for proper ANSI/VT terminal state emulation
  • Toggle with `Ctrl+`` or the toolbar button

Session & UI State

  • Automatically saves and restores open files, cursor positions, scroll positions
  • Restores window geometry (size, position, maximized state)
  • Saves splitter positions (sidebar width, terminal height)
  • Per-platform storage: %APPDATA%/NoxIDE on Windows, ~/.config/NoxIDE on Linux

Window

  • Frameless window (qframelesswindow) with custom title bar
  • Menu bar embedded in the title bar (VS Code-style)
  • DWM dark mode on Windows
  • Minimize / Maximize / Restore / Close with proper hover styles

Installation

Prerequisites

pip install PyQt5 qframelesswindow pywinpty pyte

Font files fonts/MaterialSymbolsRounded.ttf and fonts/Nunito.ttf are required.
Falls back to Segoe UI / system fonts if not found.

Clone & Run

git clone https://github.com/DevNexe/NoxIDE.git
cd NoxIDE
python main.py

Project Structure

NoxIDE/
├── main.py                          # Entry point
│
├── core/
│   ├── constants.py                 # Material Icons glyphs, encoding map
│   ├── file_operations.py           # Read/write files, encoding detection
│   ├── models.py                    # FileModel (QFileSystemModel) + EditorModel
│   └── session_manager.py           # Save/restore session.json + ui_state.json
│
├── controllers/
│   └── editor_controller.py         # Open, save, save-as, change encoding
│
├── ui/
│   ├── main_window.py               # NoxIDE (FramelessWindow) — menus, shortcuts
│   ├── components/
│   │   ├── editor.py                # CodeEditor (QPlainTextEdit + line numbers)
│   │   ├── highlighter.py           # PythonHighlighter (QSyntaxHighlighter)
│   │   ├── scrollbar.py             # Animated ScrollBar with opacity animation
│   │   ├── sidebar.py               # Icon sidebar (Explorer / Search / Settings)
│   │   ├── terminal.py              # NoxTerminal (winpty + pyte + QPlainTextEdit)
│   │   └── titlebar.py              # CustomTitleBar with embedded menu bar
│   └── pages/
│       └── editor_page.py           # EditorPage — splitters, tabs, welcome screen
│
├── utils/
│   ├── resources.py                 # resource_path() — PyInstaller-safe paths
│   └── ui_helpers.py                # create_shortcut_chips() for welcome screen
│
└── fonts/
    ├── MaterialSymbolsRounded.ttf
    └── Nunito.ttf

Keyboard Shortcuts

Shortcut Action
Ctrl+N New file
Ctrl+O Open file
Ctrl+K Ctrl+O Open folder
Ctrl+S Save
Ctrl+Shift+S Save As
Ctrl+Z / Ctrl+Y Undo / Redo
Ctrl+X / Ctrl+C / Ctrl+V Cut / Copy / Paste
Ctrl+A Select All
Ctrl+= / Ctrl+- / Ctrl+0 Zoom In / Out / Reset
Ctrl+B Toggle sidebar
`Ctrl+`` Toggle terminal
Alt+F4 Exit

Session Storage

All session data is stored in a platform-specific directory:

Platform Path
Windows %APPDATA%\NoxIDE\
macOS ~/Library/Application Support/NoxIDE/
Linux ~/.config/NoxIDE/

Two files are maintained: session.json (open files, cursor/scroll positions, project path) and ui_state.json (terminal visibility, splitter sizes, sidebar width).


Requirements

  • OS: Windows (primary; Linux/macOS supported with reduced terminal features)
  • Python: 3.10+
  • Dependencies: PyQt5, qframelesswindow, pywinpty, pyte

Made by DevNexe

About

A lightweight VS Code-inspired code editor for Windows. Built with Python & PyQt5.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages