Skip to content

Instantly share code, notes, and snippets.

@elstgav
Forked from april/arena-macos-full-screen-fixes.sh
Last active March 29, 2025 15:26
Show Gist options
  • Save elstgav/31bc6de689f6e6561607e837984de84f to your computer and use it in GitHub Desktop.
Save elstgav/31bc6de689f6e6561607e837984de84f to your computer and use it in GitHub Desktop.
Fixes Magic Arena's broken full screen implementation on macOS
# Fixes the fullscreen resolution for Magic the Gathering Arena on macOS.
#
# MTGA doesn’t account for the MacBook Pro notch, so it defaults to a resolution
# that’s too wide for the screen, and cuts off important information (like the
# stack). This script sets the resolution to a scaled 16:9 resolution that fits
# the screen.
#
# Forked from april/arena-macos-full-screen-fixes.sh
# https://gist.github.com/april/ef679cf5719cc5a2ba6a55da20869ffa
function mtga_fullscreen_fix {
# Forces MTGA into fullscreen mode on startup, set to 3 to reset
# NOTE: Changing anything in the MTGA “Graphics” preference panel will reset
# these values, and then you’ll need to run this script again.
defaults write com.wizards.mtga "Screenmanager Fullscreen mode" -integer 0
defaults write com.wizards.mtga "Screenmanager Resolution Use Native" -integer 0
# Get the main display resolution, minus notch
IFS=',' read -r width scaled_height <<< "$(
system_profiler SPDisplaysDataType -json | jq -r '
.SPDisplaysDataType[].spdisplays_ndrvs[]
| select(.spdisplays_main == "spdisplays_yes")
| ._spdisplays_pixels
| split(" x ")[0]
| tonumber
| [., . / 16 * 9]
| join(",")
'
)"
defaults write com.wizards.mtga "Screenmanager Resolution Width" -integer $width
defaults write com.wizards.mtga "Screenmanager Resolution Height" -integer $scaled_height
if [[ $? -ne 0 ]]; then
echo "$fg[red]"
echo "✗ Failed to set MTGA fullscreen resolution"
echo "$reset_color"
return 1
elif [[ "$1" == "--array" ]]; then
echo "$width,$scaled_height"
else
echo "$fg[green]"
echo "✓ MTGA fullscreen resolution set to $width$scaled_height"
echo "$reset_color"
fi
}

Magic: The Gathering Arena - MacBook Pro Fullscreen Fix

An Oh My Zsh plugin that fixes the fullscreen resolution for Magic: The Gathering Arena on macOS.

MTGA doesn’t account for the MacBook Pro notch, so it defaults to a resolution that’s too wide for the screen, and cuts off important information (like the stack).

This script sets the resolution to a scaled 16:9 resolution that fits your screen.

Note

As an alternative, you can also set MTGA to “scale to fit below built-in camera”, which won’t require this script, but will display a bit narrower.

Installation

To install, clone the repository into your Oh My Zsh plugins directory:

git clone https://gist.github.com/31bc6de689f6e6561607e837984de84f.git ~/.oh-my-zsh/custom/plugins/mtga-fix

Then, add mtga-fix to your plugins array in your .zshrc file:

plugins=(
  …
  mtga-fix
)

Usage

After installing the plugin, you can use the mtga_fullscreen_fix command to set the resolution for MTGA.

mtga_fullscreen_fix

This will output something like:

$ mtga_fullscreen_fix

  ✓ MTGA fullscreen resolution set to 3024 ✕ 1701

License

Feel free to modify and use this script as you wish.

Acknowledgements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment