Metadata-Version: 2.4
Name: prs-system
Version: 1.0.0
Summary: PRS SYSTEM - Advanced PC Performance Monitor (PyQt6 glassmorphism GUI + terminal CLI)
Author: Shrimurali Raju Siddappagol
License: MIT
Keywords: performance,monitor,pyqt6,psutil,dashboard,telemetry
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Win32 (MS Windows)
Classifier: Intended Audience :: End Users/Desktop
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: PyQt6>=6.5
Requires-Dist: psutil>=5.9
Requires-Dist: pyqtgraph>=0.13
Requires-Dist: GPUtil>=1.4.0
Requires-Dist: wmi>=1.5.1; sys_platform == "win32"

# PRS SYSTEM — Advanced PC Performance Monitor

A production-grade, cyberpunk-themed desktop application **and** CLI tool for
real-time hardware telemetry. Built with **PyQt6**, **pyqtgraph**, **psutil**,
**GPUtil** and **WMI** — every hardware query runs on a dedicated background
`QThread`, so the interface never freezes.

```
prs system          →  opens the performance dashboard (GUI)
prs                 →  native "command not recognized" error on stderr
prs hi              →  same native error, naming the full invocation
                       (byte-exact PowerShell format on Windows)
```

---

## Features

| Page | What it shows |
|---|---|
| **Dashboard** | CPU / RAM / GPU / Disk / Net-speed cards + 60-second live charts |
| **CPU** | Animated speedometer gauge, model, cores/threads, base & live frequency, per-core bars, temperature, voltage, power, fan RPM |
| **GPU** | Gauge, VRAM bar, temperature — NVIDIA (GPUtil) with AMD / Intel fallback (WMI) |
| **Memory** | RAM gauge, total / used / available, module speed, swap usage |
| **Storage** | Multi-drive table: capacity, read/write speeds, SMART temperature & health |
| **Network** | Download/upload meters, live ping, IP address, adapter type, session totals |
| **Battery** | Charge gauge, charging state, health %, cycle count, time remaining |
| **Processes** | Task-manager table (Name, PID, CPU%, RAM%), search filter, sortable, Kill action |
| **Sensors** | Color-coded temperature dashboard (green < 70 °C, yellow 70–85 °C, red > 85 °C) + audible alerts |
| **Performance Mode** | Normal / Balanced / Gaming / Maximum Performance power profiles (Windows `powercfg`) |
| **AI Assistant** | Local heuristic advisor that flags resource-heavy processes and suggests fixes (no network needed) |
| **Cleaner** | Temp-file scanner with a functional **CLEAN NOW** action (locked files are skipped) |
| **About Your System** | Card-grid PC report: OS (version/build/arch/install date/user), processor (model/manufacturer/socket/cache/clocks), chassis, motherboard, BIOS, every RAM DIMM, every GPU with driver, display, storage usage bars, network adapters, battery health/cycles, runtime |
| **Settings** | 5 themes, refresh interval, alert thresholds, beep toggle |
| **Mini Overlay** | Always-on-top, frameless, draggable HUD with two car-speedometer gauges (CPU / RAM) and a live battery indicator — toggle from the sidebar |

### Alerting
An audible warning beep (via `winsound` on Windows) fires when CPU / RAM / Disk
load exceeds **85%** or battery drops below **15%** (thresholds are configurable).

## Installation

```bash
# 1. (Recommended) create a virtual environment
python -m venv .venv
.venv\Scripts\activate          # Windows
source .venv/bin/activate       # macOS / Linux

# 2. install the package (pulls PyQt6, pyqtgraph, psutil, GPUtil, WMI)
pip install -e .

# 3. run it
prs system
```

To run without installing, the same entry point works from the repo root:

```bash
python main.py
```

> **Note for Linux users:** temperature and battery sensors require the
> `lm-sensors` / `acpi` tooling to be present; the app degrades gracefully to
> "N/A" when a sensor is unavailable.

## CLI usage

Two libraries share the ``prs`` command and delegate to each other at
runtime (no subprocess spawning):

* **prs-system** owns ``prs system`` (GUI) and ``prs help``
* **prs-tree-explorer** owns every tree command - when installed
  (``pip install prs-tree-explorer``), typing ``prs`` prints the tree of
  the current directory and ``prs <path>`` prints the tree of that path
  (unquoted paths containing spaces are reconstructed automatically);
  otherwise prs-system falls back to the native
  "command not recognized" error

```
prs system              Launch the performance dashboard (GUI)
prs                     Directory tree of current dir (via prs-tree-explorer)
prs <path>              Directory tree of that path (via prs-tree-explorer)
prs help | -h | --help  Show package help
prs <anything else>     Delegated to prs-tree-explorer; or the native
                        "command not recognized" error if it is not installed
```

The error output matches what the shell itself prints: PowerShell's
``ObjectNotFound: (<cmd>:String) [], CommandNotFoundException`` block on
Windows, ``bash: <cmd>: command not found`` on macOS/Linux. It is written
directly to stderr without spawning any subprocess.

> **Coexistence note:** both packages register a ``prs`` console script, so
> the one installed **last** owns the ``prs`` shim on PATH. Each package
> delegates to the other by import, so either install order works - prs-system
> delegates bare ``prs`` to prs-tree-explorer, and prs-tree-explorer should
> route ``prs system`` back to ``prs_system.gui``.


## Themes

Five built-in glassmorphism themes, switchable live from **Settings**:

1. **Cyber Blue** — neon cyan `#00F0FF` + purple on deep AMOLED `#0B0E14`
2. **Neon Green** — phosphor green on dark emerald
3. **Orange Racing** — hot orange on carbon black
4. **AMOLED Black** — pure black with blue/violet accents (OLED-friendly)
5. **Glass Mode** — frosted translucent cards over a deep blue gradient

## Project layout

```
prs_system/
├── __init__.py
├── cli.py               # CLI router & OS command execution
├── gui.py               # Main PyQt6 application window
├── config.py            # Themes, QSS engine, constants, settings store
├── workers.py           # Multi-threaded telemetry / process / cleaner workers
├── ui/
│   ├── sidebar.py       # Left navigation
│   ├── header.py        # Page header + live clock
│   ├── ststusbar.py     # Bottom live status strip
│   ├── speedometer.py   # 240° animated neon ring gauge
│   ├── mini_overlay.py  # Always-on-top floating widget
│   ├── cards.py         # Glassmorphism metric/info cards
│   └── alert.py         # Audible warning triggers
└── views/               # One module per dashboard tab
    ├── dashboard_view.py   ├── cpu_view.py        ├── gpu_view.py
    ├── memory_view.py      ├── storage_view.py    ├── network_view.py
    ├── battery_view.py     ├── process_view.py    ├── sensors_view.py
    ├── performance_view.py ├── ai_view.py         ├── cleaner_view.py
    ├── sysinfo_view.py     └── settings_view.py
```

## Requirements

- Python **3.10+**
- Windows 10/11 recommended (WMI & `powercfg` give the richest telemetry);
  Linux/macOS supported with reduced sensor depth

## License

MIT
