Comments (9)
Yep. I used to query Whichspace this way to get the current space index and then used that in earlier versions of my KM macros. Pretty sure I've seen some of your macros on the forum. I'm a lurker there but perhaps it's time to start posting!
from whichspace.
+1, I'd love this and am willing to sponsor this feature
from whichspace.
Hello,
I had a need for a command line utility as well so I grabbed the WhichSpace function that queries the spaces info and wrapped it in a command line swift app.
You can find it here: https://github.com/davidpurnell/SpaceInfo
from whichspace.
Cheers! Starred, will give it a spin
I discovered / was using https://github.com/alt-jero/McSpaces in the meantime, it works fine, but bit of a raw one.
from whichspace.
Ah, McSpaces is giving UUIDs. My version outputs integers incremented from 1. I'm using it in some Keyboard Maestro macros so my use case required simple numbering of spaces. Hope that works for you!
from whichspace.
Yes actually my usage of McSpaces was pretty hacky. It gives you a blank UUID for Space #1, and an actual UUID for the rest.
By coincidence, I was only interested in querying "am I in space #1?" so getting a blank UUID was enough
A number-based approach is more robust and allows more use cases.
from whichspace.
If you guys donβt mind sharing, what kinds of things are you using this for? KM macros sound interesting.
from whichspace.
I have several KM macros that move windows around between multiple displays and spaces. These macros need to know what current space and/or display index the frontmost window is located on.
Just trying to keep my hands on the keyboard and off the mouse as much as possible...
If you want to take a look at my macros, they are here: github.com/davidpurnell/km-macros
from whichspace.
I have several KM macros that move windows around between multiple displays and spaces. These macros need to know what current space and/or display index the frontmost window is located on.
@davidpurnell, SpaceInfo looks cool. You may know this already, but if WhichSpace is running, you can get the current space with AppleScript:
tell application "System Events" to tell process "WhichSpace" to set temp to (title of menu bar items of menu bar 1)
return item 1 of temp
I'm going to check out your macros on GitHub. Have you shared them on the KM Forum? If not consider doing so. It's a great place to share KM ideas.
I've also developed a set of KM macros to manage spaces; there are on the forum: Desktop Spaces β’ Macros for Navigation and Window Management
from whichspace.
Related Issues (20)
- "Check for Updates" menu option disabled HOT 1
- The app counts the dashboard and full screen app as a desktop HOT 2
- Which Space counts FullScreen apps as Spaces HOT 2
- Multiple Icons in Top Bar HOT 3
- Add a LICENSE
- Feature suggestion: space title HOT 1
- Feature Request - Make Space Number Available via AppleScript HOT 6
- Named spaces HOT 1
- Unaligned on macOS Big Sur HOT 5
- Number off by one if Dashboard was enabled before Catalina HOT 3
- Allow setting icons instead of numbers HOT 1
- [feature request] display space ID for every active monitor HOT 16
- Show workspace number correct if multiple screens are used HOT 1
- [feature request] Add support for Apple Silicon HOT 3
- [feature request] Check which spaces are used HOT 1
- Can't install on M1 Mac, OS Monterey 12.1 HOT 4
- Center the number in the menu bar icon HOT 1
- Call a script whenever the space changes
- Auto-update failing on OS X HOT 3
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 whichspace.