I've looked at this question but there's nothing automatic about it, I'm not trying to open a GUI and fiddle with settings everytime I start and stop playing a game.
In Steam, it's possible to edit the launch options of a game. For instance I use bumblebee to enable my laptop's nvidia card by adding primusrun %command%
to the launch options. Here we should be able to call starting and ending scripts (or just string together some commands) to disable HUD hotkey buttons during gameplay and re-enable them afterward. Something along the lines of launchscript ; %command% ; endscript
perhaps.
This means we need a command line way to enable and disable the HUD hotkey. This answer shows a CLI method. I've tried this and it works from the terminal but not when I try to call it via the launch options within Steam. When trying it with bash -c
I run into issues with the delimiters but that is solved using gsettings instead.
I've tried all of the following but with no success:
dconf write /org/compiz/integrated/show-hud '[""]' ; primusrun %command%
bash -c 'dconf write /org/compiz/integrated/show-hud '[""]'' ; primusrun %command%
bash -c 'dconf write /org/compiz/integrated/show-hud '[""]' ; primusrun %command%'
bash -c "dconf write /org/compiz/integrated/show-hud '[""]' ; primusrun %command%"
I've also tried using gsettings rather than dconf.
e.g. bash -c 'gsettings set org.compiz.integrated show-hud '[""]'' ; primusrun %command%
but again it works in the terminal but not from the launch options.
I'm pretty sure I'm just running into syntax problems, how can I get this to work properly?