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