How to open a app in fullscreen via terminal in bash code I would like to know how you would be able to open a app of your choice in fullscreen by using bash code in terminal.
Here's the AppleScript you can use to launch the app and then go to fullscreen mode.

on run argv
    if (count of argv) &gt; 0 then
        set result to item 1 of argv
    else
        set result to text returned of (display dialog "Enter the name of the app to launch" default answer "")
    end if

    set appName to result

    tell application appName
        activate
        delay 3

        tell application "System Events" to tell process appName
            set value of attribute "AXFullScreen" of window 1 to true
        end tell

    end tell
end run


Paste that to Script Editor.app, save it as a script (run only). Give osascript access to accessibility functions in Preferences->Privacy->Accessibility (click + and locate /usr/bin/osascript).

With that you can run something like osascript fullscreen.scpt Photos.