#!/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

# Seems like some computers get stuck with geforce settings after install that blocks startup
pkill -9 -f geforce && pkill -9 -f GeForce
rm -rf .var/app/com.nvidia.geforcenow*

notify-send "󰢹    NVIDIA GeForce NOW" "Start it from the app launcher (Super + Space)"
