Last active
February 16, 2024 17:26
-
-
Save simons-public/50489319f09b2776f507332f75d74553 to your computer and use it in GitHub Desktop.
Auto-maximize flatpaks launched on steam deck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /home/deck/.config/systemd/user/flatpak-pid.path | |
# | |
# Enable with | |
# systemctl --user enable --now flatpak-pid.path | |
# | |
[Unit] | |
Description=Monitor for flatpak pids to maximize them in gamescope | |
[Path] | |
PathExistsGlob=/run/user/1000/.flatpak/*/pid | |
Unit=gamescope-maximize.service | |
[Install] | |
WantedBy=default.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /home/deck/.config/systemd/user/gamescope-maximize.service | |
[Unit] | |
Description=Maximize currently focused gamescope app | |
StartLimitBurst=1000 | |
[Service] | |
Type=oneshot | |
Restart=on-failure | |
RestartSec=1s | |
Environment=DISPLAY=:1 | |
ExecStart=/usr/bin/bash -c "/usr/bin/xdotool windowsize $(xdotool getwindowfocus) 100% 100%" | |
# No [Install] section, meant to be run by a path trigger |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment