-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathlaunch-gui.sh
More file actions
29 lines (25 loc) · 930 Bytes
/
launch-gui.sh
File metadata and controls
29 lines (25 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
# GUI launcher for OptiScaler Manager
cd "$(dirname "$0")"
# Try to launch in different terminal emulators
TERMINALS=(
"konsole --workdir $(pwd) -e ./run.sh"
"gnome-terminal --working-directory=$(pwd) -- ./run.sh"
"xfce4-terminal --working-directory=$(pwd) -e ./run.sh"
"alacritty --working-directory=$(pwd) -e ./run.sh"
"kitty --directory=$(pwd) ./run.sh"
"terminator --working-directory=$(pwd) -e ./run.sh"
"xterm -e 'cd $(pwd) && ./run.sh'"
)
# Try each terminal until one works
for terminal_cmd in "${TERMINALS[@]}"; do
terminal_name=$(echo "$terminal_cmd" | cut -d' ' -f1)
if command -v "$terminal_name" >/dev/null 2>&1; then
echo "Launching OptiScaler Manager in $terminal_name..."
eval "$terminal_cmd" &
exit 0
fi
done
# Fallback: try to run directly if no terminal found
echo "No terminal emulator found. Trying to run directly..."
./run.sh