A simple bash script to force maximize non-steam apps in Steam Deck's Gamescope. This is intended to work on other resolutions when using an external display.
I made this due to those pesky apps that don't offer an easy way to maximize on init and/or have problems in fullscreen (I am looking at you Discord and Firefox).
I am still messing around with this and it probably doesn't work with all applications (specially the apps that limit window dimensions).
- Go into desktop mode.
- Install the
wmctrl
binary. You can also use the one in this repository and put it on a directory of your choice (I recommend in $PATH). In my case, I have installed it viapacman
and so it's in/usr/bin/wmctrl
. The script will try to locate it in any $PATH directory or if set with the--wmctrl_path
optional argument. - Download the
maxwin
file and put it in a directory of your choice, I recommend~/.local/bin/maxwin
. - Add an application to steam. (E.g. right click executable > Add to Steam).
- Go into gamemode and then to the newly added application properties.
- Change 'Game Resolution' to 'Native'.
- Copy the command in 'Target' and append it to the beginning of the 'Launch Options', and change 'Target' to the
maxwin
script path (e.g. Target was/usr/bin/flatpak
and Launch Options:run com.discordapp.Discord
and it becomes, in my case, Target=/home/deck/.local/bin/maxwin
and Launch Options=/usr/bin/flatpak -- run com.discordapp.Discord
). - Modify 'Launch Options' according to the
maxwin
guide (usemaxwin --help
to check help and examples).
Target: /home/deck/.local/bin/maxwin
Start in: /home/deck/.local/bin/
Launch Options: name "Friends - Discord" -- flatpak run com.discordapp.Discord
Target: /home/deck/.local/bin/maxwin
Start in: /home/deck/.local/bin/
Launch Options: name "Mozilla Firefox" -- flatpak "run" "--branch=stable" "--arch=x86_64" "--command=firefox" "--file-forwarding" "org.mozilla.firefox"
Target: /home/deck/.local/bin/maxwin
Start in: /home/deck/.local/bin/
Launch Options: viewable -- "/usr/bin/steamos-nested-desktop"