diff --git a/bin/omarchy-install-retroarch b/bin/omarchy-install-retroarch new file mode 100755 index 00000000..fa5b3c4f --- /dev/null +++ b/bin/omarchy-install-retroarch @@ -0,0 +1,27 @@ +#!/bin/bash + +# omarchy:summary=Install RetroArch with the full libretro core set plus FBNeo and a ~/Games ROM directory. + +set -e + +omarchy-pkg-aur-add retroarch retroarch-assets libretro libretro-fbneo + +# Set up ~/Games as the default ROM directory +mkdir -p "$HOME/Games" + +CFG="$HOME/.config/retroarch/retroarch.cfg" +mkdir -p "$(dirname "$CFG")" +touch "$CFG" + +set_cfg() { + local key=$1 value=$2 + if grep -q "^$key = " "$CFG"; then + sed -i "s|^$key = .*|$key = \"$value\"|" "$CFG" + else + echo "$key = \"$value\"" >>"$CFG" + fi +} + +set_cfg rgui_browser_directory "$HOME/Games" + +setsid gtk-launch com.libretro.RetroArch.desktop >/dev/null 2>&1 & diff --git a/bin/omarchy-menu b/bin/omarchy-menu index e92585cf..343d2794 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -389,7 +389,7 @@ show_install_gaming_menu() { case $(menu "Install" " Steam\n󰢹 NVIDIA GeForce NOW\n RetroArch [AUR]\n󰍳 Minecraft\n󰖺 Xbox Controller [AUR]") in *Steam*) present_terminal omarchy-install-steam ;; *GeForce*) present_terminal omarchy-install-geforce-now ;; - *RetroArch*) aur_install_and_launch "RetroArch" "retroarch retroarch-assets libretro libretro-fbneo" "com.libretro.RetroArch.desktop" ;; + *RetroArch*) present_terminal omarchy-install-retroarch ;; *Minecraft*) install_and_launch "Minecraft" "minecraft-launcher" "minecraft-launcher" ;; *Xbox*) present_terminal omarchy-install-xbox-controllers ;; *) show_install_menu ;;