Fix HDMI recovery dispatches for Lua Hyprland sessions
This commit is contained in:
1 parent
d963224cb7
commit
34bae045c3
7 files changed
+163
-10
No files matched your search
@@ -5,7 +5,7 @@ an Arch Linux / Hyprland workstation and back. A DRM hotplug event triggers a
|
||||
short switch away from the active graphical VT and back. There is no periodic
|
||||
DPMS toggle or polling timer.
|
||||
|
||||
**Version 0.2.0.** The initial implementation and the review fixes are separate
|
||||
**Version 0.2.1.** The initial implementation and the review fixes are separate
|
||||
commits. See [the code review](docs/code-review.md) and [changelog](CHANGELOG.md).
|
||||
|
||||
## Requirements
|
||||
@@ -24,14 +24,14 @@ recovery. Hyprland must still expose the configured monitor over its IPC socket.
|
||||
|
||||
## Install from the package
|
||||
|
||||
Download `hyprland-hdmi-revive-0.2.0.tar.gz` and `SHA256SUMS` from the
|
||||
Download `hyprland-hdmi-revive-0.2.1.tar.gz` and `SHA256SUMS` from the
|
||||
[Gitea release](https://gitea.jr-it-services.de/johannes/hyprland-hdmi-revive/releases).
|
||||
Run as your desktop user, **without sudo**:
|
||||
|
||||
```bash
|
||||
sha256sum --ignore-missing -c SHA256SUMS
|
||||
tar -xzf hyprland-hdmi-revive-0.2.0.tar.gz
|
||||
cd hyprland-hdmi-revive-0.2.0
|
||||
tar -xzf hyprland-hdmi-revive-0.2.1.tar.gz
|
||||
cd hyprland-hdmi-revive-0.2.1
|
||||
./scripts/install.sh
|
||||
```
|
||||
|
||||
@@ -92,7 +92,19 @@ uses `sudo -n` with command timeouts. A return failure gets one emergency retry.
|
||||
### Connect the Hyprland session
|
||||
|
||||
The user service manager does not automatically inherit a terminal's Hyprland
|
||||
environment. Add this line to your Hyprland configuration (commonly
|
||||
environment. For a Lua configuration, add this hook to your loaded Lua config:
|
||||
|
||||
```lua
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd([[sh -c '
|
||||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
systemctl --user import-environment HYPRLAND_INSTANCE_SIGNATURE XDG_CONFIG_HOME &&
|
||||
systemctl --user restart revive-monitor-drm-watch.service
|
||||
']])
|
||||
end)
|
||||
```
|
||||
|
||||
For a legacy hyprlang configuration, use this line instead (commonly in
|
||||
`~/.config/hypr/hyprland.conf`):
|
||||
|
||||
```ini
|
||||
@@ -124,6 +136,9 @@ and IPC guards prevent pre-login VT switching.
|
||||
A reported non-Hyprland desktop is excluded.
|
||||
- The helper independently verifies the requested VT and rechecks the session
|
||||
after settling and permission checks.
|
||||
- DPMS/focus commands follow the active config provider reported by
|
||||
`hyprctl -j status`: Lua or legacy hyprlang. Older versions without this query
|
||||
use legacy commands. A refresh error is logged before aborting recovery.
|
||||
- A private `XDG_RUNTIME_DIR` is required. Locks prevent duplicate watchers and
|
||||
overlapping recoveries; there is no shared `/tmp` fallback.
|
||||
- Missing IPC, invalid monitor names, command failures and lost event streams
|
||||
|
||||
Reference in new issue
Block a user