Skip to content

A Python-based macOS tool that resizes all Minecraft (Java-based) application windows. With a simple CMD keypress, you can toggle between two predefined window sizes. Built using AppleScript and Python for seamless integration with macOS. Perfect for streamlining your Minecraft experience on macOS!

Notifications You must be signed in to change notification settings

wikiweb/minecraft-window-resizer-macos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Minecraft Window Resizer for macOS

Overview

Minecraft Window Resizer for macOS is a Python-based tool that allows you to resize all Minecraft (Java-based) windows on macOS with a simple CMD keypress. The script toggles between two predefined window sizes, providing a seamless way to adjust your Minecraft experience.

Features

  • Automatically detects all Java application windows (e.g., Minecraft).
  • Resizes all detected windows to predefined dimensions.
  • Toggles between two configurable window sizes with a single CMD keypress.
  • Built using Python and AppleScript for smooth macOS integration.

Requirements

System Requirements

  • macOS (compatible with recent versions).

Python Requirements

  • Python 3.7 or later.
  • Required libraries:
    • pynput
    • subprocess (built-in with Python)

Install the required Python libraries with the following command:

pip install pynput

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/minecraft-window-resizer-macos.git
    cd minecraft-window-resizer-macos
  2. Install the required Python packages:

    pip install pynput
  3. Ensure that Accessibility permissions are enabled for Terminal or your Python executable:

    • Go to System Settings > Privacy & Security > Accessibility.
    • Add Terminal or your Python application and enable it.

Usage

  1. Run the script:

    python3 resize_java_windows.py
  2. Press the CMD key to toggle between the predefined window sizes:

    • Size 1: 200x1000
    • Size 2: 1920x1080
  3. All Minecraft (or other Java-based) windows will be resized to the selected dimensions.

Customization

Change Window Sizes

You can modify the window_sizes variable in the script to set your desired dimensions:

window_sizes = [(200, 1000), (1920, 1080)]

Add as many size options as you need.

Compile to Executable

To make the script standalone, use PyInstaller:

  1. Install PyInstaller:
    pip install pyinstaller
  2. Create an executable:
    pyinstaller --onefile resize_java_windows.py
  3. The executable will be located in the dist directory.

Example Output

  • CMD Key Press:
    All Java windows resized to 200x1000.
    All Java windows resized to 1920x1080.
    

Notes

  1. Ensure that all Java-based applications (e.g., Minecraft) are running before triggering the resize.
  2. If a window does not support resizing or an error occurs, the script will skip it gracefully.
  3. To avoid macOS security restrictions, grant the required permissions as mentioned above.

License

This project is licensed under the MIT License.

Contribution

Feel free to submit issues or pull requests to improve this project. Suggestions are always welcome!

About

A Python-based macOS tool that resizes all Minecraft (Java-based) application windows. With a simple CMD keypress, you can toggle between two predefined window sizes. Built using AppleScript and Python for seamless integration with macOS. Perfect for streamlining your Minecraft experience on macOS!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages