Initial Version

This commit is contained in:
Bashy 2026-04-25 13:09:44 +03:00
commit bdf4330738
5 changed files with 383 additions and 0 deletions

79
README.md Normal file
View file

@ -0,0 +1,79 @@
# HudFX LNX
A transparent, always-on-top screen overlay for HudFX alerts on Linux. Displays your HudFX browser overlay URL on a chosen monitor without interfering with other windows or inputs. Optionally launches automatically with OBS.
## Requirements
**Python 3** and the following packages:
```bash
sudo apt install python3-pyqt5 python3-pyqt5.qtwebengine
```
## Setup
### 1. Configure the overlay
Run the tray app:
```bash
python3 ~/projects/HudFX_LNX/hudfx.py
```
A tray icon will appear. Right-click → **Settings** and enter:
- Your HudFX overlay URL
- Which monitor to display on (picked from a list of detected screens)
Settings are saved to `~/.config/hudfx-lnx/config.json`.
### 2. Using the overlay
The overlay starts automatically when the tray app launches. Right-click the tray icon to:
- **Stop overlay** / **Start overlay** — toggle it on or off
- **Settings** — change URL or monitor
- **Quit** — close everything
### 3. Auto-start with OBS (optional)
To have the overlay launch and close automatically with OBS:
1. Open OBS → **Tools → Scripts**
2. Click **+** and select `~/projects/HudFX_LNX/obs_hudfx.py`
The overlay will start when OBS finishes loading and stop when OBS exits. The tray icon still appears so you can toggle it off mid-session if needed.
The OBS script auto-detects whether OBS is installed as a Flatpak or natively and adjusts accordingly — no manual configuration needed.
## Logging
When launched via OBS, the overlay logs to:
```
~/projects/HudFX_LNX/hudfx.log
```
OBS script activity (start/stop events, errors) is visible in OBS under **Tools → Scripts → Script Log**.
To follow the overlay log in real time:
```bash
tail -f ~/projects/HudFX_LNX/hudfx.log
```
`hudfx.log` is excluded from version control via `.gitignore`.
## Files
| File | Purpose |
|---|---|
| `hudfx.py` | Main tray app — run this directly for standalone use |
| `obs_hudfx.py` | OBS script — add via OBS Tools → Scripts |
| `overlay.py` | Standalone overlay (no tray UI, takes URL as argument) |
## Notes
- The overlay is click-through — you can interact with everything underneath it normally
- Audio and video autoplay are enabled — no interaction needed for alerts to play
- No cookies or data are written to disk (off-the-record browser profile)
- Tested on Linux Mint 21.3 (Virginia) with OBS 31.1.2 (Flatpak), 3-monitor setup (2560×1440 center + two 1080p)
- Compatible with both native and Flatpak OBS installations