Initial commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Function to clean up on exit
|
||||
cleanup() {
|
||||
sudo systemctl stop fenrirscreenreader.service 2>/dev/null || true
|
||||
}
|
||||
|
||||
# Set up trap for cleanup
|
||||
trap cleanup EXIT
|
||||
|
||||
if [[ -r "/home/stormux/.local/games/Upheaval/Upheaval_Command_Line" ]]; then
|
||||
pushd "/home/stormux/.local/games/Upheaval/" > /dev/null
|
||||
|
||||
# Comprehensive terminal reset
|
||||
reset
|
||||
clear
|
||||
stty sane
|
||||
stty echo
|
||||
stty icanon
|
||||
stty -raw
|
||||
stty -cbreak
|
||||
|
||||
# Start screen reader
|
||||
sudo systemctl start fenrirscreenreader.service
|
||||
|
||||
# Give screen reader time to initialize
|
||||
sleep 1
|
||||
|
||||
# Run the game with proper terminal handling
|
||||
# Use exec to replace the shell process entirely
|
||||
exec stdbuf -i0 -o0 -e0 FEXLoader ./Upheaval_Command_Line 2>&1 | grep -v '^vc4: driver missing$'
|
||||
popd > /dev/null
|
||||
fi
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
trap 'sudo systemctl stop fenrirscreenreader.service' EXIT
|
||||
|
||||
export BOX64_LOG=0
|
||||
if [[ -r "/home/stormux/.local/games/Warsim/Warsim.exe" ]]; then
|
||||
pushd "/home/stormux/.local/games/Warsim/"
|
||||
clear
|
||||
sudo systemctl start fenrirscreenreader.service
|
||||
wine Warsim.exe 2> /dev/null | grep -v '^box64'
|
||||
popd
|
||||
else
|
||||
GAME='Warsim' startx
|
||||
fi
|
||||
Executable
+113
@@ -0,0 +1,113 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
# Stop the screen reader if this closes for any reason
|
||||
trap 'sudo -n /usr/bin/systemctl stop fenrirscreenreader.service' SIGINT SIGTERM SIGHUP EXIT
|
||||
|
||||
# Start Fenrir for interaction with the terminal
|
||||
sudo -n /usr/bin/systemctl start fenrirscreenreader.service
|
||||
|
||||
# Clear the screen before loading
|
||||
clear
|
||||
|
||||
case "$GAME" in
|
||||
"Alter Aeon")
|
||||
pushd ~/.local/games/tintin-alteraeon
|
||||
git pull -q
|
||||
tt++ aa.tin
|
||||
popd
|
||||
;;
|
||||
"BPG")
|
||||
pushd ~/.local/games/bpg
|
||||
git pull -q
|
||||
./bpg.sh
|
||||
popd
|
||||
;;
|
||||
"Empire MUD")
|
||||
pushd ~/.local/games/tintin-empiremud
|
||||
git pull -q
|
||||
tt++ em.tin
|
||||
popd
|
||||
;;
|
||||
"End of Time")
|
||||
pushd ~/.local/games/tintin-endoftime
|
||||
git pull -q
|
||||
tt++ eot.tin
|
||||
popd
|
||||
;;
|
||||
"Kallisti MUD")
|
||||
pushd ~/.local/games/tintin-kallisti-pack
|
||||
git pull -q
|
||||
tt++ kallisti.tin
|
||||
popd
|
||||
;;
|
||||
"RS Games")
|
||||
pushd ~/.local/games/tintin-rsgames
|
||||
git pull -q
|
||||
tt++ rs.tin
|
||||
popd
|
||||
;;
|
||||
"Slay the Text")
|
||||
pushd ~/.local/games/slaythetext
|
||||
git pull -q
|
||||
python3 main.py
|
||||
popd
|
||||
;;
|
||||
"Stationfall")
|
||||
frotz ~/.local/frotz/Stationfall/stationfall-r107-s870430.z3
|
||||
;;
|
||||
"Planetfall")
|
||||
frotz ~/.local/frotz/Planetfall/planetfall-r39-s880501.z3
|
||||
;;
|
||||
"The Hitchhiker's Guide to the Galaxy")
|
||||
frotz ~/.local/frotz/"The Hitchhiker's Guide to the Galaxy/HITCHHIK.DAT"
|
||||
;;
|
||||
"Zork 1") ;&
|
||||
"Zork 2") ;&
|
||||
"Zork 3")
|
||||
frotz ~/.local/frotz/${GAME/ /}/DATA/ZORK${GAME##* }.DAT
|
||||
;;
|
||||
"IRC")
|
||||
if ! ping -c1 stormux.org &> /dev/null ; then
|
||||
spd-say -Cw "No internet connection detected. Please go to the system menu and select configure internet."
|
||||
exit 0
|
||||
fi
|
||||
configFile="$HOME/.irssi/config"
|
||||
validNickRegex='^[[:alnum:]_-]*$'
|
||||
# Check if nick and user_name are still set to "stormux"
|
||||
if grep -qE '^\s*nick = "stormux";' "$configFile" && grep -qE '^\s*user_name = "stormux";' "$configFile"; then
|
||||
echo "First time connection setup:"
|
||||
echo
|
||||
echo "Let's get you set up with your own nick."
|
||||
echo "This is the name other people will see when you join, chat, leave, etc."
|
||||
echo
|
||||
while : ; do
|
||||
echo "Enter your desired IRC nick:"
|
||||
read -re newNick
|
||||
if [[ $newNick =~ $validNickRegex ]]; then
|
||||
# Update nick and user_name in config
|
||||
sed -i "s/^\(\s*nick = \)\"stormux\";/\1\"$newNick\";/" "$configFile"
|
||||
sed -i "s/^\(\s*user_name = \)\"stormux\";/\1\"$newNick\";/" "$configFile"
|
||||
echo "Configuration updated. Launching irssi..."
|
||||
break
|
||||
else
|
||||
echo "Invalid IRC nickname. Must start with a letter and contain only letters, numbers, and these symbols: - [ ] \\ \` ^ { } _"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
# Launch irssi
|
||||
/usr/bin/irssi
|
||||
;;
|
||||
"Network Configuration")
|
||||
count=0
|
||||
while [[ $count -lt 10 ]]; do
|
||||
sleep 1
|
||||
if echo "setting set focus#highlight=True" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock 2> /dev/null ; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
nmtui-connect
|
||||
;;
|
||||
*".md") /usr/bin/markdown -toc "$GAME" | /usr/bin/w3m -T text/html ;;
|
||||
"/usr/bin/"*) $GAME ;;
|
||||
esac
|
||||
@@ -0,0 +1,6 @@
|
||||
# Reload changes with control+x followed by control+r
|
||||
set echo-control-characters off
|
||||
|
||||
# History searching with up and down arrows.
|
||||
"\e[A": history-search-backward
|
||||
"\e[B": history-search-forward
|
||||
Executable
+351
@@ -0,0 +1,351 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Function to run a game with FEXLoader
|
||||
fex_load() {
|
||||
local gameDir="$1"
|
||||
local exeName="$2"
|
||||
export FEX_NO_SANDBOX=1
|
||||
export MESA_GL_VERSION_OVERRIDE=3.2
|
||||
export SPD_SOCKET=/run/user/1000/speech-dispatcher/speechd.sock
|
||||
pushd "$HOME/.local/games/$gameDir"
|
||||
FEX_NO_SANDBOX=1 MESA_GL_VERSION_OVERRIDE=3.2 BOX64_DYNAREC_STRONGMEM=1 DISPLAY=:0 FEXLoader ./$exeName
|
||||
popd
|
||||
}
|
||||
|
||||
# Function to run a Windows game with wine via FEXBash
|
||||
run_wine() {
|
||||
local gameDir="$1"
|
||||
local exeName="$2"
|
||||
local needNvda="${3:-}"
|
||||
pushd "$HOME/.local/games/$gameDir"
|
||||
if [[ ${#needNvda} > 1 ]]; then
|
||||
systemctl --user start ${needNvda}.service
|
||||
FEXBash -c "wine \"$exeName\""
|
||||
systemctl --user stop ${needNvda}.service
|
||||
else
|
||||
FEXBash -c "wine $exeName"
|
||||
fi
|
||||
popd
|
||||
}
|
||||
|
||||
# Function to handle downloadable games with installation
|
||||
setup_and_run_downloadable() {
|
||||
local zipName="$1"
|
||||
local gameDir="$2"
|
||||
local executable="$3"
|
||||
local fallbackUrl="$4"
|
||||
local needNvda="$5"
|
||||
local zipPath=~/Downloads/"$zipName"
|
||||
local extractDir="$HOME/.local/games/$gameDir"
|
||||
if [[ -e "$zipPath" ]]; then
|
||||
# Recreate extractDir
|
||||
rm -rf "$extractDir"
|
||||
mkdir -p "$extractDir"
|
||||
# Get the first path component of each file in the zip
|
||||
mapfile -t topDirs < <(unzip -l "$zipPath" | awk 'NR>3 {print $4}' | grep '/$' | cut -d/ -f1 | sort -u | grep -v '^$')
|
||||
if [[ ${#topDirs[@]} -eq 1 ]]; then
|
||||
# Zip has a single top-level dir Ãse it as final dir
|
||||
unzip -q "$zipPath" -d ~/.local/games
|
||||
else
|
||||
# Unzips file into the given directory without creating a subdirectory
|
||||
unzip -q "$zipPath" -d "$extractDir"
|
||||
fi
|
||||
# Copy NVDA DLLs
|
||||
for i in 32 64; do
|
||||
find "$extractDir" -type f -name "nvdaControllerClient${i}.dll" -exec cp -v "$HOME/.local/games/nvda/nvdaControllerClient${i}.dll" '{}' \;
|
||||
done
|
||||
rm -f "$zipPath"
|
||||
fi
|
||||
if [[ -e "$extractDir/$executable" ]]; then
|
||||
run_wine "${extractDir##*/}" "./$executable" "$needNvda"
|
||||
else
|
||||
run_web "$fallbackUrl"
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to handle all web-based games
|
||||
run_web() {
|
||||
orca &
|
||||
exec brave "$1"
|
||||
}
|
||||
|
||||
# Function to handle unpacked web games
|
||||
# Function to handle unpacked web games
|
||||
setup_and_run_web_game() {
|
||||
local zipName="$1"
|
||||
local gameDir="$2"
|
||||
local htmlPath="$3"
|
||||
local fallbackUrl="$4"
|
||||
local zipPath=~/Downloads/"$zipName"
|
||||
local extractDir="$HOME/.local/games/$gameDir"
|
||||
if [[ -e "$zipPath" ]]; then
|
||||
# Recreate extractDir
|
||||
rm -rf "$extractDir"
|
||||
mkdir -p "$extractDir"
|
||||
# Get the first path component of each file in the zip
|
||||
mapfile -t topDirs < <(unzip -l "$zipPath" | awk 'NR>3 {print $4}' | grep '/$' | cut -d/ -f1 | sort -u | grep -v '^$')
|
||||
if [[ ${#topDirs[@]} -eq 1 ]]; then
|
||||
# Zip has a single top-level dir - extract to ~/.local/games
|
||||
unzip -q "$zipPath" -d "$HOME/.local/games"
|
||||
else
|
||||
# Unzips file into the given directory
|
||||
unzip -q "$zipPath" -d "$extractDir"
|
||||
fi
|
||||
rm -f "$zipPath"
|
||||
fi
|
||||
if [[ -e "$extractDir/$htmlPath" ]]; then
|
||||
run_web "$extractDir/$htmlPath"
|
||||
else
|
||||
run_web "$fallbackUrl"
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to run native applications
|
||||
run_native() {
|
||||
local gameDir="$1"
|
||||
local exeName="$2"
|
||||
pushd "/home/stormux/.local/games/$gameDir"
|
||||
case "${exeName##*.}" in
|
||||
"py")
|
||||
python3 "$exeName"
|
||||
;;
|
||||
"py")
|
||||
./"$exeName"
|
||||
;;
|
||||
esac
|
||||
popd
|
||||
}
|
||||
|
||||
# Initial setup
|
||||
if [[ -e /etc/X11/xorg.conf.d/10-headless.conf ]]; then
|
||||
export LIBGL_ALWAYS_SOFTWARE=1
|
||||
fi
|
||||
|
||||
[ -f /etc/xprofile ] && . /etc/xprofile
|
||||
[ -f ~/.xprofile ] && . ~/.xprofile
|
||||
export BOX64_PATH="$HOME/.fex-emu/RootFS/ArchLinux/usr/bin"
|
||||
export BOX64_NOBANNER=1
|
||||
export MESA_GL_VERSION_OVERRIDE=3.2
|
||||
export BOX64_DYNAREC_STRONGMEM=1
|
||||
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
|
||||
export DBUS_SESSION_BUS_PID
|
||||
exec dwm &
|
||||
xbindkeys
|
||||
|
||||
|
||||
# Main game launcher
|
||||
case "$GAME" in
|
||||
"Apple 2e")
|
||||
exec mame apple2ee -sl1 echoii -flop1 ~/.local/games/apple2e/Echo\ II\ -\ Textalker\ DOS\ 3.3.dsk -samplerate 48000 -sound pulse
|
||||
;;
|
||||
"Audio Disc")
|
||||
run_wine "audiodisc" "disco.exe"
|
||||
;;
|
||||
"BallBouncer")
|
||||
fex_load BallBouncer BallBouncer
|
||||
;;
|
||||
"Battle of the Hunter")
|
||||
run_wine "Battle of the Hunter" "bth.exe" "nvda2speechd"
|
||||
;;
|
||||
"blueman-manager")
|
||||
orca &
|
||||
blueman-manager
|
||||
;;
|
||||
"Bokurano Daibouken")
|
||||
/home/stormux/.local/files/clipboard_translator.sh play.exe bokurano-daibouken &
|
||||
run_wine "bk" "play.exe"
|
||||
killall speech-dispatcher
|
||||
;;
|
||||
"Bokurano Daibouken 2")
|
||||
/home/stormux/.local/files/clipboard_translator.sh play.exe bokurano-daibouken2 &
|
||||
run_wine "bk2" "play.exe"
|
||||
killall speech-dispatcher
|
||||
;;
|
||||
"Bokurano Daibouken 3")
|
||||
if [[ -d /home/stormux/.local/games/bk3/dict ]] || [[ -e ~/Downloads/dict.dat ]]; then
|
||||
[[ -e ~/Downloads/dict.dat ]] && mv ~/Downloads/dict.dat /home/stormux/.local/games/bk3/
|
||||
run_wine "bk3" "play.exe" "nvda2speechd"
|
||||
else
|
||||
/home/stormux/.local/files/clipboard_translator.sh play.exe bokurano-daibouken3 &
|
||||
run_wine "bk3" "play.exe"
|
||||
fi
|
||||
killall speech-dispatcher
|
||||
;;
|
||||
"Bop It")
|
||||
~/.local/files/speak_window_title.sh bop.exe &
|
||||
run_wine "BopIt" "bop.exe"
|
||||
;;
|
||||
"Brave")
|
||||
run_web "" # Runs brave without a specific URL
|
||||
;;
|
||||
"Challenge of the Horse")
|
||||
run_wine "Challenge of the Horse" "game.exe" "nvda2speechd"
|
||||
;;
|
||||
"Clashes of the Sky")
|
||||
run_wine "clashes_of_the_sky" "clash.exe" "nvda2speechd"
|
||||
;;
|
||||
"Constant Motion")
|
||||
run_wine "ConstantMotion" "cm.exe" "nvda2speechd"
|
||||
;;
|
||||
"Crazy Party")
|
||||
run_wine "Crazy-Party-beta82" "Crazy\ Party.exe" "nvda2speechd-important"
|
||||
;;
|
||||
"Doom")
|
||||
pushd /home/stormux/.local/games/doom/toby-doom-launcher
|
||||
git pull -q
|
||||
orca &
|
||||
exec "./Toby Doom Launcher.py"
|
||||
popd
|
||||
;;
|
||||
"Dosbox")
|
||||
exec dosbox-x -fastlaunch -conf /opt/talking-dosbox/dosbox-x.conf
|
||||
;;
|
||||
"Fantasy Story 2")
|
||||
pushd "/home/stormux/.local/games/Fantasy Story 2/FS2_3.0_Linux"
|
||||
FEXBash './fs2.x86_64'
|
||||
popd
|
||||
;;
|
||||
"Golf")
|
||||
run_wine "golf" "golf.exe"
|
||||
;;
|
||||
"Haunted House")
|
||||
pushd /home/stormux/.local/games/haunted-house
|
||||
./runner haunted-house
|
||||
popd
|
||||
;;
|
||||
"Haunted Party")
|
||||
setup_and_run_downloadable "hp.zip" "hp" "hp.exe" "https://tunmi13.itch.io/haunted-party" "nvda2speechd"
|
||||
;;
|
||||
"Kaskade")
|
||||
setup_and_run_downloadable "battlefield-2d-win.zip" "bf" "bf.exe" "https://tunmi13.itch.io/kaskade" "nvda2speechd"
|
||||
;;
|
||||
"Mach1")
|
||||
run_wine "mach1" "mach1.exe"
|
||||
;;
|
||||
"Manamon 2")
|
||||
run_wine "Manamon 2" "rpg.exe" "nvda2speechd"
|
||||
;;
|
||||
"Mine Racer")
|
||||
pushd /home/stormux/.local/games/Mineracer
|
||||
./mineracer
|
||||
popd
|
||||
;;
|
||||
"Oh Shit")
|
||||
run_wine "oh_shit" "OhShit.exe" "nvda2speechd"
|
||||
;;
|
||||
"Pong")
|
||||
run_wine "pong" "pong.exe"
|
||||
;;
|
||||
"Q9 Action Game")
|
||||
run_wine "Q9 Action Game" "q9.exe"
|
||||
;;
|
||||
"Retro Arch")
|
||||
/usr/bin/retroarch --accessibility
|
||||
killall speech-dispatcher
|
||||
;;
|
||||
"River Raiders")
|
||||
run_wine "River Raiders" "raid.exe"
|
||||
;;
|
||||
"RS Games")
|
||||
run_wine "RS Games Client" "rsg.exe" "nvda2speechd-important"
|
||||
;;
|
||||
"Scramble")
|
||||
run_wine "scramble_win32" "scramble.exe" "nvda2speechd"
|
||||
;;
|
||||
"Screaming Strike 2")
|
||||
run_wine "Screaming Strike 2" "play.exe" "nvda2speechd"
|
||||
;;
|
||||
"Scrolling Battles")
|
||||
run_wine "Scrolling Battles" "sb.exe" "nvda2speechd"
|
||||
;;
|
||||
"Shadow Line")
|
||||
run_wine "ShadowRine_FullVoice" "play_sr.exe" "nvda2speechd"
|
||||
;;
|
||||
"Shooter")
|
||||
run_wine "shooter" "Shooter.exe" "nvda2speechd"
|
||||
;;
|
||||
"Side Party")
|
||||
setup_and_run_downloadable "sideparty-win.zip" "SideParty" "SideParty.exe" "https://masonasons.itch.io/sideparty" "nvda2speechd"
|
||||
;;
|
||||
"Skateboarder Pro")
|
||||
run_wine "sb_pro_rw" "sb_pro.exe" "nvda2speechd"
|
||||
;;
|
||||
"Sketchbook (Your World)")
|
||||
run_wine "SBYW" "SBYW.exe" "nvda2speechd-important"
|
||||
;;
|
||||
"SoundRTS")
|
||||
run_native "SoundRTS" "soundrts.py"
|
||||
;;
|
||||
"Super Egg Hunt")
|
||||
run_wine "super egg hunt" "superegghunt.exe"
|
||||
;;
|
||||
"Super Liam")
|
||||
run_wine "Super Liam" "sl.exe"
|
||||
;;
|
||||
"The Blind Swordsman")
|
||||
FEXBash -c 'wine ~/.local/games/TheBlindSwordsman.exe'
|
||||
;;
|
||||
"The Tornado Chicken")
|
||||
fex_load "The Tornado Chicken" "Ttc"
|
||||
;;
|
||||
"Top Speed 3")
|
||||
run_wine "Top Speed 3" "TopSpeed.exe"
|
||||
;;
|
||||
"Toy Mania")
|
||||
if [[ -e ~/Downloads/ToyMania_windows_portable_password_is_GrateCollector.7z ]]; then
|
||||
rm -rf ~/.local/games/ToyMania
|
||||
mkdir -p ~/.local/games/ToyMania
|
||||
7z x ~/Downloads/ToyMania_windows_portable_password_is_GrateCollector.7z -o/home/stormux/.local/games/ToyMania -pGrateCollector
|
||||
rm -f ~/Downloads/ToyMania_windows_portable_password_is_GrateCollector.7z
|
||||
fi
|
||||
if [[ -e ~/.local/games/ToyMania/tm.exe ]]; then
|
||||
cp ~/.local/games/nvda/nvdaControllerClient64.dll ~/.local/games/ToyMania/lib/nvdaControllerClient64.dll
|
||||
systemctl --user start nvda2speechd-important.service
|
||||
pushd ~/.local/games/ToyMania
|
||||
exec FEXBash -c 'wine ./tm.exe'
|
||||
popd
|
||||
systemctl --user stop nvda2speechd-important.service
|
||||
else
|
||||
orca &
|
||||
exec brave "https://tsatria03.itch.io/toymania"
|
||||
fi
|
||||
;;
|
||||
"Upheaval")
|
||||
setup_and_run_downloadable "upheaval-linux-console.zip" "Upheaval" "Upheaval_Command_Line" "https://leonegaming.itch.io/upheaval"
|
||||
;;
|
||||
"Villains From Beyond")
|
||||
run_wine "villains from beyond" "game.exe"
|
||||
;;
|
||||
"Warsim")
|
||||
setup_and_run_downloadable "Warsim Full Game.zip" "Warsim" "Warsim.exe" "https://huw2k8.itch.io/warsim"
|
||||
;;
|
||||
"Wheels of Prio")
|
||||
fex_load "Wheels of Prio" "Wp"
|
||||
;;
|
||||
"Wicked Quest")
|
||||
run_native "wicked-quest" "wicked_quest.py"
|
||||
;;
|
||||
"Zombowl")
|
||||
run_native "zombowl" "zombowl.py"
|
||||
;;
|
||||
"https://shiftbacktick.itch.io/periphery-synthetic-ep")
|
||||
setup_and_run_web_game "periphery-synthetic-ep-html5.zip" "periphery-synthetic-ep" "index.html" "$GAME"
|
||||
;;
|
||||
"https://"*)
|
||||
run_web "$GAME"
|
||||
;;
|
||||
*".dsk")
|
||||
xbindkeys
|
||||
exec mame apple2ee -sl1 echoii -flop1 ~/.local/games/apple2e/Echo\ II\ -\ Textalker\ DOS\ 3.3.dsk -flop2 "$GAME" -samplerate 48000 -sound pulse
|
||||
;;
|
||||
*"/Roms/"*)
|
||||
exec mednafen -sounddriver sdl -sound 1 "$GAME"
|
||||
;;
|
||||
*)
|
||||
echo "No valid game specified in \$GAME"
|
||||
sleep 5
|
||||
;;
|
||||
esac
|
||||
|
||||
# Make sure X goes down after game ends
|
||||
pkill -15 Xorg
|
||||
@@ -0,0 +1,7 @@
|
||||
# Accessibility variables
|
||||
export ACCESSIBILITY_ENABLED=1
|
||||
export GTK_MODULES=gail:atk-bridge
|
||||
export GNOME_ACCESSIBILITY=1
|
||||
export QT_ACCESSIBILITY=1
|
||||
export QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
|
||||
export SAL_USE_VCLPLUGIN=gtk3
|
||||
Reference in New Issue
Block a user