From 5e42a452603d3720156289f8691279204953c2d0 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 24 Dec 2024 11:12:36 -0500 Subject: [PATCH] Fixed the desktop file creation function. You will need to recreate your desktop shortcut. --- .gitignore | 1 + linux-game-manager.sh | 12 +----------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index a879e57..c4e3cbc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +nohup.out /.launch/*.sh diff --git a/linux-game-manager.sh b/linux-game-manager.sh index ec1cf2a..13a9268 100755 --- a/linux-game-manager.sh +++ b/linux-game-manager.sh @@ -152,7 +152,7 @@ desktop_launcher() { 'Name=Linux game manager' 'GenericName=Linux game Manager' 'Comment=Install and launch games that are accessible to the blind' - "Exec=${terminal} -t \"Linux Game Manager\" -e \"/usr/bin/bash -c 'nohup $(readlink -e "$0") 2> /dev/null'\"" + "Exec=${terminal} -t \"Linux Game Manager\" -e \"/usr/bin/bash -c 'pushd $(readlink -e "${0%/*}");nohup ./"${0##*/}" 2> /dev/null'\"" 'Terminal=false' 'Type=Application' 'StartupNotify=false' @@ -333,19 +333,9 @@ help() { # main script -add_launcher() { - local launchSettings="${game}|${*}" - if ! grep -F -q -x "${launchSettings}" "${configFile}" 2> /dev/null ; then - echo "${launchSettings}" >> "${configFile}" - sort -o "${configFile}" "${configFile}" - fi -} - # Install games game_installer() { - # Get list of installed games from config file - mapfile -t installedGames < <(sed '/^$/d' "${configFile}" 2> /dev/null | cut -d '|' -f1) # Create the menu of available games by reading from .install directory declare -a menuList # Get all .sh files from .install directory, excluding those starting with #, and sort them