#!/bin/bash

# Install and launch Geforce Now.

set -e

omarchy-pkg-add flatpak
cd /tmp

# Download and run GeForce NOW
curl -LO https://international.download.nvidia.com/GFNLinux/GeForceNOWSetup.bin
chmod +x GeForceNOWSetup.bin
./GeForceNOWSetup.bin

# Ensure a separate browser process not started by GFN is available.
# If not, it seems like GFN has a tendency to hang on login.
setsid omarchy-launch-browser
