|
20 | 20 | - 🏠 **Native OS Scheduling** — uses `cron` on Linux, `Task Scheduler` on Windows (no background process needed on windows, on linux it will need an application open on the user to run the tasks) |
21 | 21 | - 🎨 **Themes** — multiple dark/light themes |
22 | 22 |
|
23 | | ---- |
24 | | - |
25 | | -## ⚡ Quick Start |
26 | | - |
27 | | -### Option A: Download Pre-built Executable *(Recommended)* |
28 | | - |
29 | | -1. Download the latest release from the [Releases page](https://github.com/juke32/PyCronVideoAlarm/releases) |
30 | | -2. Extract the folder anywhere you want the app to live permanently |
31 | | -3. Run the executable: |
32 | | - - **Windows**: `PyCronVideoAlarm_Windows.exe` |
33 | | - - **Linux**: `./PyCronVideoAlarm_Linux` (may need: `chmod +x PyCronVideoAlarm_Linux`) |
34 | | -4. On first run, go to **Settings → Add to Applications** to register it in your app launcher |
35 | | - |
36 | | -> [!TIP] |
37 | | -> **Keep the folder in one place.** Cron/Task Scheduler entries point to this exact path. Moving the exe after setting alarms will break the schedule links. |
38 | | -
|
39 | | -### Option B: Run from Source |
40 | | - |
41 | | -```bash |
42 | | -git clone https://github.com/juke32/PyCronVideoAlarm.git |
43 | | -cd PyCronVideoAlarm |
44 | | -python3 -m venv .venv |
45 | | -source .venv/bin/activate # Linux |
46 | | -# .venv\Scripts\activate.bat # Windows |
47 | | -pip install -r requirements.txt |
48 | | -python src/main.py |
49 | | -``` |
50 | | - |
51 | | ---- |
52 | 23 |
|
53 | | -## 📦 Dependencies |
54 | | - |
55 | | -### External (install separately) |
56 | | - |
57 | | -| Dependency | Purpose | Linux | Windows | |
58 | | -|---|---|---|---| |
59 | | -| **MPV (Linux)** | Video & audio playback | `sudo apt install mpv` | - | |
60 | | -| **VLC (Windows)** | Video & audio playback | - | [videolan.org](https://www.videolan.org/vlc/) or `winget install VideoLAN.VLC` | |
61 | | - |
62 | | -### Python (auto-installed via `requirements.txt`) |
63 | | - |
64 | | -| Package | Purpose | |
65 | | -|---|---| |
66 | | -| `Pillow` | Image handling / icon display | |
67 | | -| `python-crontab` | Linux cron scheduling *(Linux only)* | |
68 | | -| `jeepney` | DBus / Wayland support *(Linux only)* | |
69 | | -| `pycaw`, `comtypes`, `pywin32` | Windows audio + Task Scheduler *(Windows only)* | |
70 | | -| `pyautogui`, `opencv-python` | Screen automation actions | |
71 | | -| `sounddevice`, `numpy`, `scipy` | Audio recording action | |
72 | | - |
73 | | ---- |
74 | 24 |
|
75 | 25 | ## 📂 Folder Structure |
76 | 26 |
|
@@ -101,81 +51,17 @@ PyCronVideoAlarm/ |
101 | 51 |
|
102 | 52 | --- |
103 | 53 |
|
104 | | -## 🐧 Linux Setup |
105 | | - |
106 | | -### Make it executable |
107 | | -```bash |
108 | | -chmod +x PyCronVideoAlarm_Linux |
109 | | -./PyCronVideoAlarm_Linux |
110 | | -``` |
111 | | - |
112 | | -### Crontab access |
113 | | -The app schedules alarms via cron. Test access with: |
114 | | -```bash |
115 | | -crontab -l |
116 | | -# "no crontab for user" = you have access (just no entries yet) |
117 | | -# "permission denied" = run: echo $USER | sudo tee -a /etc/cron.allow |
118 | | -``` |
119 | | - |
120 | | -> [!CAUTION] |
121 | | -> Never run the app or set alarms with `sudo`. Cron jobs set as root cannot access your display or audio session. |
122 | | -
|
123 | | -### Brightness control |
124 | | -Install `brightnessctl` for the most reliable brightness support: |
125 | | -```bash |
126 | | -sudo apt install brightnessctl |
127 | | -``` |
128 | | -Or add your user to the `video` group: |
129 | | -```bash |
130 | | -sudo usermod -aG video $USER # log out and back in after |
131 | | -``` |
132 | | - |
133 | | -### Session requirement |
134 | | -Your user session must be **logged in** for media to play. The app automatically injects `DISPLAY` and `XDG_RUNTIME_DIR` into cron commands for GUI playback. |
135 | | - |
136 | | -For full Linux details (Fedora, udev rules, codecs, sleep inhibition): see [README_Linux.md](./README_Linux.md) |
137 | | - |
138 | | ---- |
139 | | - |
140 | | -## 🪟 Windows Setup |
141 | | - |
142 | | -1. Download and run `VideoAlarm_Windows.exe` |
143 | | -2. Install VLC: `winget install VideoLAN.VLC` or from [videolan.org](https://www.videolan.org/vlc/) |
144 | | -3. Alarms are registered in **Windows Task Scheduler** — no background process needed |
145 | | -4. Go to **Settings → Add to Start Menu** to add a shortcut |
146 | | - |
147 | | -> [!NOTE] |
148 | | -> Windows can wake from sleep to fire an alarm if configured in Task Scheduler (enabled by default in the app). |
149 | | -
|
150 | | ---- |
151 | | - |
152 | | -## 🛠️ Troubleshooting |
| 54 | +## 📖 Installation Guides |
153 | 55 |
|
154 | | -| Problem | Solution | |
155 | | -|---|---| |
156 | | -| Alarm didn't fire | Check the **Next Alarm** ticker in the Alarms tab. Verify cron/Task Scheduler using a 1-minute test alarm. | |
157 | | -| Video won't play | Ensure MPV (Linux) or VLC (Windows) is installed. | |
158 | | -| No sound | On Linux, check `XDG_RUNTIME_DIR` is set. The app logs this on each alarm run. | |
159 | | -| App won't open on Linux | Run `chmod +x VideoAlarm_Linux` then try again | |
160 | | -| Brightness control fails | Install `brightnessctl` or add user to `video` group (Linux) | |
| 56 | +Choose your operating system for detailed installation and setup instructions: |
161 | 57 |
|
162 | | -Enable **Settings → Logging** and check the logs folder for detailed error output. |
| 58 | +- **[🪟 Windows Setup Guide](./README_Windows.md)** |
| 59 | +- **[🐧 Linux Setup Guide](./README_Linux.md)** |
| 60 | +- **[🍎 macOS Setup Guide](./README_macOS.md)** |
163 | 61 |
|
164 | 62 | --- |
165 | 63 |
|
166 | | -## 🏗️ Building from Source |
167 | 64 |
|
168 | | -```bash |
169 | | -# Linux |
170 | | -./build_linux.sh |
171 | | - |
172 | | -# Windows |
173 | | -build_windows.bat |
174 | | -``` |
175 | | - |
176 | | -Or push a commit whose message **starts with** `build` to trigger GitHub Actions (builds both platforms automatically). |
177 | | - |
178 | | ---- |
179 | 65 |
|
180 | 66 | ## 🤝 Contributing & Support |
181 | 67 |
|
|
0 commit comments