Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Space names keep switching to wrong spaces #100

Open
nickgolob opened this issue Jul 17, 2024 · 2 comments
Open

Space names keep switching to wrong spaces #100

nickgolob opened this issue Jul 17, 2024 · 2 comments

Comments

@nickgolob
Copy link

Describe the bug
After naming all of my spaces, the order gets messed up (I name two spaces, A and B. Later the names switch to B and A).
I think this happens most often when unplugging from an external monitor.

Versions

  1. MySIMBL version - MacForge 1.2.2 (3) ?
  2. Spaces Renamer version - 1.10.4
  3. MacOS version - 14.5 (23F79)

Command Outputs
Please paste the output of running these commands in Terminal:

  • ps aux | grep -v grep | grep -i macforge

root 1529 0.0 0.0 410676768 3728 ?? Ss Mon10PM 0:00.08 /Library/PrivilegedHelperTools/com.macenhance.MacForge.Injector
nickgolob 1526 0.0 0.1 412190416 36352 ?? S Mon10PM 0:04.09 /Applications/MacForge.app/Contents/Library/LoginItems/MacForgeHelper.app/Contents/MacOS/MacForgeHelper

  • ps aux | grep -v grep | grep -i spacesrenamer
    nickgolob 48832 0.1 0.3 35923208 84172 ?? S 3:48PM 0:12.56 /Applications/SpacesRenamer.app/Contents/MacOS/SpacesRenamer

  • csrutil status
    System Integrity Protection status: disabled.

@jvthomas90
Copy link

This may not necessarily be related to Spaces Renamer but rather how macOS is natively handling your Spaces based on the options you've configured in System Settings > Desktop and Dock > Mission Control

Screenshot 2024-07-17 at 19 18 15

The first toggle is the most likely culprit.

  • Turning this off will ensure they stay exactly as you've manually arranged them via drag'n'drop.
  • Otherwise, your Spaces will swap their positions around based on an MRU sort
    • a.k.a. "most recently used" order
    • Think of how the Command+TAB icons behave, where your most frequently visited apps propogate towards the left so that they can be tabbed to in just one or a few keystrokes whereas your least accessed appsend up populating towards the farther right-hand side of that list –– the same behavior will apply to your Spaces if this toggle is left in the ON position.

The other option you might want to consider experimenting with is the last toggle towards the very bottom, i.e. Displays have separate Spaces

  • Using your example, with this toggle turned OFF, your main display as well as your external monitor will both share the same Spaces that are labeled A and B.
    • This is just my guess, mind you, but this may be why once you unplug your monitor the Spaces get rearranged since (assuming that first Automatically rearrange Spaces based on usage toggle is also turned ON) either the recency, or the frequency, or some combination of both, of the B Space on your external monitor exceeds your usage patterns on the main display leading up to the disconnect – such that once only one main monitor is left macOS quickly reshuffles B in front of A as a higher priority Space based on the aggregate usage times of both A and B Spaces reflected across two separate displays.
  • And if you leave this toggled ON, then what ends up happening is that Space A and Space B remain fixed on your main display whereas once you've connected your external monitor a brand new "Desktop 3" Space will spawn on that side.
    • You may use Spaces Renamer to assign this the label "C", or anything else for that matter, including "A" or "B" if you'd like – but even if you aesthetically alter "Desktop 3" to superficially have the same label as "A" and cosmetically alter it to have the same wallpaper as the original Space A, etc, etc, functionally under-the-hood this is a separate and dedicated Space reserved for the other monitor only.
    • Likewise, A and B will only exist on your main display.
    • Desktop 3 will disappear when you unplug your monitor and re-appear when you connect it again, but at no point will it propagate to the main display

Ergo, no "unexpected" rearrangement will occur due to you disconnecting your display, since they don't share usage stats anymore. It's a more nuanced and subtle approach, requiring you to still be mindful of how often you spend time in Space A and B lest they rearrange themselves (but at least that calculation will only occur on the main display as opposed to seemingly random reshuffling occurring based on the aggregate values of usage times from duplicate Spaces spanning across two different displays).

That said, the most direct and straightforward fix is the first solution I mentioned. Since that first toggle is explicitly designed to automatically sort Spaces, turning this toggle off will cause macOS to drop the "MRU" algorithm and effectively switch to a user-configured manual-sort where your Spaces will safely remain static until you drag them around again.

TL;DR

  1. the top toggle should definitely solve your problem right away, no further thought required, point, blank, period.
  2. Choose the bottom toggle if you ever come to appreciate the ease of access benefit that MRU sort provides (now that you know that that's what it's doing under the hood) and therefore want to keep that top toggle turned on but want to experiment with the sort only occurring per-display (i.e. no more abrupt or inexplicably sudden rearrangements once you disconnect your external display)

@nickgolob
Copy link
Author

Thank you!! Appreciate your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants