Comments (5)
Thanks Alex! See, I've come across a similar command to this, but both retrieve the leftmost desktop of the display, not the one that's currently being used (active desktop).
My use case is that if I create a new desktop, which by default is named Desktop #, I'd like to rename this new desktop, and to do that I need to get the UUID for that active desktop, not the leftmost one.
And I agree, if I can identify the current active desktop, then I could tell Alfred what to name it and work around using AppleScript.
from spaces-renamer.
Ah, Spaces Renamer actually keeps track of it properly in the currentspaces.plist, which is how it knows which one to select when you open the window. You can get at it with a slightly modified command as long as Spaces Renamer is installed: /usr/libexec/PlistBuddy -c "print :Monitors:0:Current\ Space:uuid" ~/Library/Containers/com.alexbeals.spacesrenamer/com.alexbeals.spacesrenamer.currentspaces.plist
from spaces-renamer.
Uh-oh, looks like it's working... thank you! I will write a quick script tonight or this week and re-open if there are any issues. But this looks very promising. Thank you! 👊
from spaces-renamer.
In addition to that, any way I can trigger the window with a keyboard shortcut?
I've tried using AppleScript, but for whatever reason this clicks on the menu bar icon, but does not open the window.
tell application "System Events"
tell process "SpacesRenamer"
click menu bar item 1 of menu bar 2
end tell
end tell
from spaces-renamer.
From the command line, this command will give you the current space's UUID (in the first monitor, not sure how this plays with multiple monitor setups).
/usr/libexec/PlistBuddy -c "print :SpacesDisplayConfiguration:Management\ Data:Monitors:0:Current\ Space:uuid" ~/Library/Preferences/com.apple.spaces.plist
If you're trying to programmatically do this, you're probably better off writing to the raw plist file than opening the window. Not sure how to open the window with AppleScript 😕, but if you point me to an open source project that has support, I can see what I'm doing differently.
from spaces-renamer.
Related Issues (20)
- Don't see the spaces-renamer version of mission control bar HOT 3
- SpacesRenamer stopped working HOT 2
- for monterey HOT 4
- Labels not getting updated HOT 4
- Cannot Identify Monitors when using muti-monitors and each monitor has the same number of desktops HOT 1
- Use two monitors, on 1 of the monitors, there are 5 spaces in Renamer, only 4 on my OS HOT 1
- Desktop names not shown in expanded view HOT 3
- Using Spaces Renamer with Monterey on M1 chip HOT 1
- Spaces Renamer does not work if 'Reduce Transparency' is turned on HOT 1
- Update Names button is greyed out HOT 1
- Does not changes space names HOT 16
- Spaces-Renamer.app does not show any window when started HOT 1
- Feature Request HOT 7
- Feature Request: Hot Key for Workspace Renaming HOT 1
- Unable to Uninstall HOT 1
- MacOS 14 "Sonoma" status? HOT 8
- MacOS Sonoma problems HOT 11
- Doesn't work after updating to Sonoma 14.4 HOT 15
- Sonoma 14.4.1, SpacesRenamer not working HOT 1
- Not Working On OS X 14.3 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spaces-renamer.