Xterm added as valid terminal.
This commit is contained in:
@@ -39,6 +39,7 @@ python3 .codex/skills/linux-game-manager-dev/scripts/audit_game_catalog.py
|
||||
- `game_launcher` enumerates `.launch/*.sh` entries.
|
||||
- Entries with first line `#//` are skipped.
|
||||
- Selected launcher is sourced/executed.
|
||||
- Text-terminal launchers can fall back to `xterm`, which inherits the requested working directory before executing the game command.
|
||||
|
||||
3. **Removal flow**
|
||||
- `game_removal` resolves launcher entry to real script.
|
||||
@@ -57,7 +58,7 @@ python3 .codex/skills/linux-game-manager-dev/scripts/audit_game_catalog.py
|
||||
- `-u`: update game
|
||||
- `-t`: show number of available games
|
||||
- `-C`: clear cache
|
||||
- `-D`: create desktop launcher
|
||||
- `-D`: create desktop launcher; terminal discovery includes `xterm`, using its `-T` title option instead of `-t`
|
||||
- `-L`: show license
|
||||
- `-h`: show help
|
||||
- `-N`: enable no-cache mode
|
||||
|
||||
+17
-3
@@ -381,13 +381,23 @@ terminal_emulator() {
|
||||
# Arguments workingDirectory, rest of arguments
|
||||
local workingDir="$1"
|
||||
shift
|
||||
terminals=(
|
||||
local -a terminals=(
|
||||
"lxterminal"
|
||||
"mate-terminal"
|
||||
"gnome-terminal"
|
||||
"xterm"
|
||||
)
|
||||
for i in "${terminals[@]}" ; do
|
||||
if command $i --working-directory="${workingDir}" -e "$@" ; then
|
||||
if ! command -v "$i" > /dev/null 2>&1 ; then
|
||||
continue
|
||||
fi
|
||||
if [[ "$i" == "xterm" ]]; then
|
||||
if (cd "${workingDir}" && command xterm -e "$@"); then
|
||||
return
|
||||
fi
|
||||
continue
|
||||
fi
|
||||
if command "$i" --working-directory="${workingDir}" -e "$@" ; then
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -415,14 +425,18 @@ desktop_launcher() {
|
||||
local launchDirectory
|
||||
local terminal
|
||||
# Try to find an accessible terminal
|
||||
for i in mate-terminal lxterminal terminator gnome-terminal ; do
|
||||
for i in mate-terminal lxterminal terminator gnome-terminal xterm ; do
|
||||
if command -v $i > /dev/null 2>&1 ; then
|
||||
terminal="$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
launchDirectory="${scriptRoot}"
|
||||
if [[ "${terminal}" == "xterm" ]]; then
|
||||
printf -v execLine "Exec=xterm -T \"Linux Game Manager\" -e /usr/bin/bash -c \"pushd %q;nohup ./%q 2> /dev/null\"" "${launchDirectory}" "${0##*/}"
|
||||
else
|
||||
printf -v execLine "Exec=%s -t \"Linux Game Manager\" -e \"/usr/bin/bash -c 'pushd %q;nohup ./%q 2> /dev/null'\"" "${terminal}" "${launchDirectory}" "${0##*/}"
|
||||
fi
|
||||
dotDesktop=('[Desktop Entry]'
|
||||
'Name=Linux game manager'
|
||||
'GenericName=Linux game Manager'
|
||||
|
||||
Reference in New Issue
Block a user