geforcenow-native/README.md
28allday ab845890ae Initial commit: install/uninstall scripts for NVIDIA GeForce NOW flatpak
Targets the official com.nvidia.geforcenow flatpak (not the community
electron build). Forces XWayland for Hyprland compatibility and injects
a marker-bracketed windowrule into ~/.config/hypr/hyprland.conf so it
takes effect on Omarchy (where ~/.config/hypr/windowrules.conf is not
auto-sourced).

Updated for Hyprland 0.54.3:
- Uses modern `windowrule = ...` syntax (drops deprecated windowrulev2).
- Idempotent marker block in hyprland.conf, with hyprctl reload.
- Restarts Elephant so Walker picks up the new .desktop entry.
2026-05-03 14:03:40 +01:00

57 lines
2 KiB
Markdown

# geforcenow-native
Install / uninstall scripts for the **official NVIDIA GeForce NOW Linux flatpak**
(`com.nvidia.geforcenow`) on Arch Linux + Hyprland (Omarchy-friendly).
This wraps the upstream NVIDIA flatpak — it does **not** use the community
electron build. The scripts force XWayland (Wayland-native is broken under
Hyprland at time of writing), drop a launcher in `~/.local/bin/geforcenow`,
register a `.desktop` entry that survives flatpak overrides, and inject a
Hyprland windowrule that opens the app fullscreen.
## Install
```bash
./install-geforcenow-native.sh
```
What it does:
1. Installs Flatpak + Flathub if missing.
2. Adds the NVIDIA GeForce NOW user-scope flatpak remote and installs
`com.nvidia.geforcenow`.
3. Forces the app onto XWayland (`--nosocket=wayland --socket=x11`).
4. Adds a `~/.local/bin/geforcenow` wrapper that sets `SDL_VIDEODRIVER=x11`.
5. Writes `~/.local/share/applications/com.nvidia.geforcenow.desktop`
pointing at the wrapper, with `StartupWMClass=GeForceNOW` so the
windowrule matches.
6. Appends a marker-bracketed block to `~/.config/hypr/hyprland.conf`
adding `windowrule = fullscreen, class:^(GeForceNOW)$` and reloads
Hyprland.
7. Restarts Walker's Elephant backend so the new entry shows up.
## Uninstall
```bash
./uninstall-geforcenow-native.sh
```
Removes the flatpak, the user remote, the launcher, both desktop entries,
the app data under `~/.var/app/`, the Hyprland marker block (and any
legacy pre-marker `GeForceNOW` lines), then reloads Hyprland and
restarts Elephant.
Flatpak and Flathub are intentionally left installed — they're often shared
with other apps.
## Notes
- Tested on Hyprland 0.54.3 with Omarchy. Uses the modern `windowrule`
syntax (no `windowrulev2`).
- The windowrule lives in `hyprland.conf` because Omarchy's stock
`hyprland.conf` does not source `~/.config/hypr/windowrules.conf`.
- Re-running the installer is safe — the marker block is stripped and
re-added, so duplicates can't accumulate.
## License
MIT