chromium/tools/mac/power/driver_scripts_templates/macros

{# Copyright 2021 The Chromium Authors #}
{# Use of this source code is governed by a BSD-style license that can be #}
{# found in the LICENSE file. #}

{# This file contains common blocks that can be reused in driver_script_templates #}

{% macro hash_bang() -%}
  #!/usr/bin/osascript
{%- endmacro %}

{% macro make_maximized() -%}
  tell application "Finder" to set desktopBounds to bounds of window of desktop
  set screenWidth to item 3 of desktopBounds
  set screenHeight to item 4 of desktopBounds
  set w to first window
  set bounds of w to {0, 0, screenWidth, screenHeight}
{%- endmacro %}