28

I keep a lot of apps running at the same time. I keep some apps in fullscreen next to the first desktop for general usage, and some other fullscreen apps next to a second desktop for "work" stuff.

The problem is that when I put an app in fullscreen it is placed next to the last space. I know that enabling "Preferences > Mission Control > Automatically rearrange spaces based on most recent use" would make apps to be placed next to the desktop I'm in, but I chose to disable it because I don't want spaces to move.

I noticed that there's a (bad) workaround:
- keep the green fullscreen button of an app clicked until it is presented the choice for placing it in the left or the right side of the screen;
- release the mouse in order to assign the app to a side;
- click anywhere on the side of the app; the app should now be fullscreen and should be placed in the next space (not at the end).

Is there a way to keep that option disabled while at the same time be able to open apps in fullscreen directly next to the desktop I'm currently in?

2
  • Same. When we've spaces for different types of jobs/roles, we open different apps in each space (we normally assign apps to open on each space), but sometimes a space has more activity and we need to open some of the apps/docs Full Screen. Then we expect the apps to be opened next to the desktop it was already opened in. It made so much sense as we could change from the desktop to the FS related apps very fast and conveniently. I was amazed by how well macOS was organised, but then found FS windows aren't desktop bounded precisely when the desktops have a fixed place Any new direct solution?
    – Martin
    Commented Oct 20, 2020 at 12:03
  • 2023 Update: This seems to have come back to being a bug. It was working just the way you seem to want it up until the most recent Big Sur update. Now I'm back to doing it your way. I will add the shortcut as mentioned below, but come on! Why?? Additionally, the shortcut doesn't always work if you're reopening an application that was already fullscreen. Now it just goes back to the end of the line, furthest from my desktop (I have about 10 screens open).
    – petestmart
    Commented Apr 27, 2023 at 18:31

3 Answers 3

3

Fastest way to do it today (October 21st, 2020) with macOS Catalina, is getting a custom keyboard shortcut to open it "full screen" to the left or right and select the window (this last with the mouse, there's no way to make a shortcut to it that I know, but window is big enough to not take long to select it):

  1. System Preferences / Keyboard / Shortcuts / App Shortcuts
  2. Click the '+' button (encircled in red in the pic): App Shortcuts with keyboard shortcut added by '+' button
  3. On "Menu Tittle" add exactly what is inside the following quotation marks (or replace Left with Right if preferred): "Tile Window to Left of Screen".
  4. Press the keyboard shortcut you want for it. As the shortcut for Full Screen is Ctrl + Command + f, I'd recommend using Ctrl + Option + Command + f as it is the full screen that we are going to use (mainly or optionally) and it is is easy to type. Click Add.

Now you can just use Ctrl + Option + Command + f and then click on the tiled window to make it a Full Screen next (right) to the desktop where you opened it.

Want to put it back to the desktop it came from? Press Ctrl + Command + f (as for full screen) and it'll be right back.

It reduces the time from 5 to 1 or 2 secs. Surely less if animations are disabled.

Still I'd rather have a direct kbd shortcut, hopefully Apple introduces it with Big Sur, but this makes it pretty usable at least.

2
  • This is almost as quick as a dedicated shortcut. Thanks for the detailed explanation!
    – Diego
    Commented Oct 22, 2020 at 14:48
  • Glad that it was useful. I found out though that when on Firefox it doesn't work for me (if it is FF what you have to make full screen). It is not listed in FF kbd shortcuts (tinyurl.com/opv6b74) nor in the shortcuts of my FF extensions. Indeed I've just tried with several other kbd combinations but none of them work. It does work in all the other apps I have. Does it happen to you / anyone else w FF?
    – Martin
    Commented Oct 23, 2020 at 10:54
3

The workaround seems to have some unnecessary length. If one holds the green button, then clicks in the app itself, it will become fullscreen right away in the next space, not at the end. It is a two step process. Just like methods like this hypothetical one: Go to view menu -> "Full screen in the next space, not the end". Also the option about rearranging the spaces was turned off in my Mac.

MacOS 10.14.5

MacBook Air 2017

3
  • @Diego, thanks for the workaround, and also Anki for the clarification. I'd say it is at least a 3 steps process though . 1 Click on green dot. 2 Wait for one second and click on "Tile Window to the Right|Left of Screen", 3. Click on the app. But time is more important that steps. I've timed it and it takes me 4-6 secs +=1 average. I think it could be done in 3 secs, and can it can take even more than 10 secs if missing any target. I think in 2020 we don't need to explain why 3-6 secs is too long for a very frequent task. Kbd shortcut for this? Meanwhile I'll see if the automator could help
    – Martin
    Commented Oct 20, 2020 at 12:27
  • @Martin "2 Wait for one second and click on "Tile Window to the Right|Left of Screen"," wasn't there when I wrote this answer :) I just don't use full screen, so don't know of any kbd shortcuts/ scripts
    – anki
    Commented Oct 20, 2020 at 13:00
  • thanks for informing... Automator doesn't seem to be for this. Hopefully it is implemented in upcoming Big Sur... ?
    – Martin
    Commented Oct 20, 2020 at 22:53
1

I've been looking for a simpler and faster solution. I ultimately settled on a hammerspoon script triggered with a global keyboard shortcut.

It basically does what's been described in the previous answers, just automatically, and binds the execution to ⌘ Command^ ControlF. There is also a one second delay to let the tile animation finish before executing the mouse click. This works for me, but one could probably experiment with the value. I've been searching for a way to disable this animation, but no option seems to affect this one. If anyone knows if it's possible, that'd be great.

Oh, and one more thing - the menus are localised, so you should change {"Okno", "Umieść okno po lewej stronie ekranu"} to you own language. I believe in English it's {"Window", "Tile Window to Left of Screen"}.

EDIT: Some apps don't have the Window menu, so I added an alternative fallback method.

local log = hs.logger.new('fullscreen-right','debug')

local function clickOnLeftScreenSide()
    log.d("left-clicking")

    local mousePosition = hs.mouse.getRelativePosition()
    local currentScreenFrame = hs.mouse.getCurrentScreen():frame()

    hs.eventtap.leftClick(
        {
            x = currentScreenFrame.x + 10,
            y = currentScreenFrame.y + 10
        }, -- with padding
        1000 -- hold for 1ms
    )

    -- restore the original mouse position
    hs.mouse.setRelativePosition(mousePosition)
end

local delayedWindowClick = hs.timer.delayed.new(1, clickOnLeftScreenSide)

local function trySelectingMenuItem(app)
    local selected = app:selectMenuItem({"Okno", "Umieść okno po lewej stronie ekranu"})

    if not selected then -- fallback to english for some apps
        selected = app:selectMenuItem({"Window", "Tile Window to Left of Screen"})
    end

    if not selected then
        log.d("No such menu item")
    end

    return selected
end

local function tileToTheLeft(app)
    local window = app:focusedWindow()

    if not window then
        log.d("No window found")
        return false
    end

    local windowAx = hs.axuielement.windowElement(window)
    windowAx:setTimeout(0.01)
    resizeButtonAx = windowAx:attributeValue("AXFullScreenButton")
    resizeButtonAx:setTimeout(0.01)
    resizeButtonAx:performAction("AXShowMenu")

    hs.eventtap.keyStroke({}, "down", 1000)
    hs.eventtap.keyStroke({}, "down", 1000)
    hs.eventtap.keyStroke({}, "return", 1000)
end

hs.hotkey.bind({"cmd", "ctrl"}, "F", function ()
    local app = hs.application.frontmostApplication()
    if not app then
        log.d("No frontmost app found")
        return
    end

    if not trySelectingMenuItem(app) then
        -- fallback to another method if the menu is absent
        tileToTheLeft(app)
    end

    delayedWindowClick:start()
end)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .