I solved this by using Automator to create an Application that makes use of an
Action > Utilities > Run Shell Script:
open -a Firefox
lsappinfo setinfo -app Firefox ApplicationType=UIElement
osascript -e 'tell application "System Events" to tell process "Firefox" to set value of attribute "AXFullScreen" of first window to true'
for f in "$@"; do open -a Firefox "$f"; done
I set the shell script
Pass input: to
as arguments, save it as "Firefox Full Screen" in
/Applications, change its icon as explained here and add it as an exception in
System Preferences > Security & Privacy > Privacy Tab > Accessibility.
I then can click the application icon or run any of the following and it works:
open -a "Firefox Full Screen"
open -a "Firefox Full Screen" --args "https://google.com"
open -a "Firefox Full Screen" --args "https://google.com" "https://twitter.com"
I'm using this coupled with the following
userChrome.css to both evade a well known issue with the macOS menu bar on full screen applications and another long standing address bar and tab auto-hide bug that Firefox have with macOS native full screen.
For a generic approach, check my other answer.
- Firefox, by default, does not have any issue on Linux or Windows to auto-hide address bar and tabs in full screen as expected. With that said, I grabbed this
userChrome.css from my ArchLinux setup. I use it on i3 and sway tiling window managers, with all the
[inFullscreen] removed, to get address bar and tabs to auto-hide in normal bordless windows.