redromnon / HeroicBashLauncher

Directly launch any Epic Games Store and GOG game from anywhere without Heroic on Linux.
GNU General Public License v3.0
354 stars 17 forks source link

[Feature Request] Run from terminal without user input #103

Closed eskay993 closed 1 year ago

eskay993 commented 1 year ago

Is your feature request related to a problem? Please describe. Assuming it can't be done already, would you consider adding a command line option to run HBL silently, or without the zenity popups or any user input?

Use case: I'm incorporating HBL into a script that I have that does all sorts of things I need. The script automatically triggers when it detects changes in a specific directory and runs HBL (among other things). Having HBL pop up a dialogue box interrupts the script and requires user input.

EDIT: I just noticed the popup disappears after a few seconds, which is good from a script flow perspective for my use case, but still takes focus away from whatever the user is doing when running in the background.

Describe the solution you'd like Something like HeroicBashLauncher --silent

What do you think? Thanks for your consideration.

Love HBL! Really solved some issues I was having launching Heroic games. Thanks for your efforts.

redromnon commented 1 year ago

There was PR created exactly for this purpose but it never moved forward. I was thinking about adding a command-line option myself.

I'll implement this whenever I find the time.

eskay993 commented 1 year ago

Awesome! Thanks for the quick response.

redromnon commented 1 year ago

The only other obstacle is that desktop users need to manually select the games they want to add to Steam. This is currently handled by a simple Zenity GUI list. Does your script makes use of this too?

eskay993 commented 1 year ago

For me personally, in my case I don't use the AddToSteam feature. My script just runs HBL to generate the _Heroic.sh files which I then use for other stuff. For testing, I created a version with all the zenity calls in HeroicBashLauncher.py commented out, and it works great with my script for my needs.

I would imagine though, in a case where someone wants to automate HBL without user interaction, they would either want all games added to Steam or no games added to Steam. So maybe this ties back into the other feature request with autoaddtosteam? Not sure if that is more complicated to do on desktop.

redromnon commented 1 year ago

I would imagine though, in a case where someone wants to automate HBL without user interaction, they would either want all games added to Steam or no games added to Steam. So maybe this ties back into the other feature request with autoaddtosteam? Not sure if that is more complicated to do on desktop.

Yeah, I'm currently thinking about it. But it's not very complicated to implement.

redromnon commented 1 year ago

So I've implemented the --silent parameter that skips GUI dialogs. Feel free to test the build - https://github.com/redromnon/HeroicBashLauncher/actions/runs/3127458252

eskay993 commented 1 year ago

Sorry for the delay.

Thanks for this. Working great! My script is very happy :)

Out of interest, did you change anything with AddToSteam on desktop? I haven't tested this but if you have, I'll give that a test as well.

redromnon commented 1 year ago

Well, I haven't changed anything for desktop users. But for Deck users, I have created a setting that allows Deck users to not make HBL add the scripts directly to Steam but create the AddToSteam.sh script instead. Just like desktop users.

redromnon commented 1 year ago

Feature included in v3.0.0