nbusseneau/hephaistos

Toggling Hephaistos on and off (Steam Deck game mode use case)

Opened this issue · 6 comments

Would there be any interest in integrating a simple GUI I wrote for your awesome mod? Or maybe just linking to it in the README.md for users who want an easy way to swap screen resolutions while in Steam's Game Mode?

https://github.com/apolopena/hephaistos-gui

Integration of the GUI in it's current implementation could be in the form of a sub command such as:
./hephaistos gui screenres

@nbusseneau I could open a PR if you are interested integrating it or just linking to it
Thanks again for your awesome mod!

Hey, thanks for your work and proposal :)

I'm not sure: I've specifically tried to have Hephaistos cross-platform and work transparently with all types of Hades installations. I've had a quick look at the implementation and it seems to me like it assumes a Gnome environment (due to depending on zenity), which of course is not going to work on all systems (though I understand the Steam Deck is the target here).

Considering the use-case, I'd rather we try to implement a new Hephaistos installation option (e.g. hephaistos patch --toggle-script) that generates a one-click script that toggles Hephaistos on or off, and which could be added as a non-Steam game to fill the need here.

I think this would be more convenient that prompting the user for resolution every time -- you patch once with the desired resolution using the "existing GUI" (i.e. interactive mode) and then you just have a mindless toggle.

What do you think?

That makes sense. I understand the need to keep it cross platform and as simple as possible. An on/off toggle added as a non steam game is good however there are common use cases where that would not be sufficient.

For example, I use the mod to run Hades in 16:10 because why not right? Also there are times when my Steam Deck is docked in Game Mode and I want to swap the resolution to 1440p on the fly. Lastly I do not want to toggle the mod back on when I do run Hades from my Desktop, because in many cases it is already set to 1440p the last time I used it. I really like being able to leave the mod on and just change screen resolutions when needed.

In the case of a simple toggle I think we would still want to notify the user visually that the mod was turned off or let them know when the mod is already off and no action was taken.

I can think of a couple of way to handle all the Steam Deck specific use cases:

  1. In addition to adding a command to the CLI to add a simple on/off toggle, also add a command that would copy the gnome specific GUI script to the users Hades game folder with the option(s) to automatically add it as a non steam game or not.
  2. I could enhance the GUI script to accept arguments that would make it to act as an on/off toggle without user input but still notify the user as to what it did or didn't do (they would have to click on the dialog to dismiss it though). The GUI script could be passed arguments that would display a button that enables the user to leave the mod on, turn it off, just swap screen resolutions or even just begin with the screen resolution swap dialog like it does now. This way the CLI could have options to add the non steam game on/off toggle and/or add the resolution swapper as its own non steam game.

Well, if this was a native GUI available on all platforms, I could see that work, but again I'm not sure about a Gnome-only tool 😅 I think we'd really need to make it more generic if it were to be integrated into Hephaistos, which is why I was thinking along the lines above -- because it was the easiest cross-platform path I could think of at a glance.

I need to think some more about this, maybe some other ideas will come.

This seems to be a situation where the problem is for a specific platform (steam deck game mode) but we want a cross platform solution, which is not completely necessary but I do understand the desire to keep the CLI 100% cross platform.

Perhaps the existing binary can be added as a non steam game with launch parameters to achieve what we need?

I was able to confirm that the problem can be solved by simply adding the hephaistos binary as a non steam game for each resolution you would like to switch to or one for mod on and on for mod off. Then set the launch parameters as needed and optionally rename each non steam game added to describe its function.

Perhaps this could be mentioned in the README.md?

Screenshot_20230919_080022

Yes this is exactly what I've been recommending people do when asked previously. The idea of the --shortcut option would be to generate a static script that calls hephaistos patch X Y or hephaistos restore so you don't have to do it manually :)