A game menu utility written in Go, run under linux terminal/TTYs, starts games in kiosk mode. Joysticks can be used to navigate through the menu.
This program is designed for linux TTYs, though it may be able to be built and run on other platforms. Most joysticks should work.
The program itself can be executed without external C libraries. However, some external programs are required:
bashrun scriptssystemdperform system controls like shutdown/reboot (by running systemctl)cageexecute GUI programs under waylandxinitexecute GUI programs under x11 (by runningstartx)
Profiles are placed in ~/.config/gamemenu/{wayland/x11/misc}. They're basically shell scripts with specific functions.
# Tell the menu the entry's name.
name() {
echo Example Entry
}
# programs to be executed. for wayland profiles they're executed by cage, for
# x11 profiles they're executed by startx, and for misc they're executed
# directly.
exec() {
some-program <params> # setup resolution, etc
some-game
}
# start functions by their names as parameter (name, exec)
$1The program has no command line parameters, all configurations are set up with environment variables.
SHELLbash executable the program uses to run scripts. Usually already set to current shell. Retrieved by runningwhichif not set.SYSTEMCTLsystemctl executable to control the system. Retrieved by runningwhichif not set.CAGEcage executable to start Wayland compositor. Retrieved by runningwhichif not set.STARTXstartx script to start X server. Retrieved by runningwhichif not set.JOYSTICKlegacy joystick device number (0 for /dev/input/js0). Defaults to 0 if not set.EVDEV_JOYSTICKjoystick device name (/dev/input/eventX). Automatically probed if not set.GM_DEFAULT_TABdefault selected tab on start, can bewayland/x11/misc. Defaults towaylandif not set.GM_COLORUI color. Can be RGB value in#rrggbb(requires terminals that support RGB), ANSI 256-color integer, or literal color names (black,red, etc.,neon/neon_rgbfor varying rainbow colors).
