voidderef / sgl

Cross-platform scriptable game loader for selecting applications/games on dedicated machines with custom IO hardware
The Unlicense
9 stars 3 forks source link

Add operator sub-menu to launch arbitrary tool commands, e.g. spawn desktop, spawn a shell #4

Open voidderef opened 3 years ago

voidderef commented 3 years ago

Summary

Add a selectable menu item to the operator menu that allows the user to go to a (Linux) desktop UI.

Detailed description

There might be situations that a user still wants a desktop UI accessible. However, when bootstrapping with SGL, there is no easily accessible option to do that.

One would be to add spawning the desktop via a game entry but that exposes it the wrong way and pollutes the menu. Instead, have this in the operator menu as another sub-menu, e.g. "tools".

For example: have a menu item to easily spawn a shell for maintenance tasks. When shell exits, go back to SGL.

Make this tool menu based on a script file to allow launching arbitrary commands/scripts. Add variables that define additional behaviour such as:

Benefits

Allows adding and launching arbitrary and (shell) scriptable service tasks to SGL for further customization.

Drawbacks

Ensure this is not in conflict with the main menu to select games. The responsibilities for each menu should be clearly separated.

Current blockers

None.

super-triangle commented 6 months ago

Was just trying to debug a machine and realized this would be ridiculously helpful. Any chance this might be doable for 1.05?

voidderef commented 6 months ago

Hey, I am unfortunately busy with other projects and SGL is currently not high up on my priority list.

If you feel comfortable, feel free to checkout the source and add this as an item in the operator menu. I would appreciate the support and contributing it back as a PR which I would also prioritize to get it reviewed and merged.

Not sure if the following might help, but some thoughts on how you could solve your problem without SGL requiring that feature:

Use a tool that runs as a daemon in the background and listens to a specific key combination that kills the SGL process and launches a desktop environment. I don't have any specific tool in mind, but maybe a shell script might do that job already. Run it in the background and keep listening to keyboard events from a plugged in keyboard. Once you detected the right events, execute a pkill and spawn the desktop.