~mil/f_scripts

ref: c52a77c4185fd4dc9a5177a5437a3329ea4c847b f_scripts/scripts/f_game -rwxr-xr-x 606 bytes
c52a77c4Miles Alan f_audio: Set AIF1 DA0 to 20% rather then 100% to prevent distortion 3 months ago
                                                                                
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
#!/usr/bin/env osh
shopt -s strict:all
DEP="moon-buggy"
DEC="Play classic console games"
DOC="
  Launches classic console games with keybindings set in fbp.
  Currently supports only the game: moon-buggy!
"

moonbuggy() {
  [ -p /tmp/fbp.fifo ] && { echo -e "\b\f\e"; echo "j a q r y" | tr " " "\n"; } > /tmp/fbp.fifo
  moon-buggy
}

main() {
  local RUN CHOICES
  CHOICES="moonbuggy"
  while true; do
    clear
    [ -p /tmp/fbp.fifo ] && { echo -e "\b\f\r"; echo "$CHOICES" | tr " " "\n"; } > /tmp/fbp.fifo
    read -p "Run ($CHOICES): " RUN
    "$RUN"
  done
}

if [ -n "$1" ]; then "$@"; else main; fi