Shortcut to rename current space

Currently the only reason I use TotalSpaces is so that I can edit the names of each workspace. I have to first check which display number I’m currently on, then open up the TotalSpaces app, go to the layout tab, and then click on the number corresponding to the space that I want to edit.

To make this quicker do you have an AppleScript that I can use to edit the name of the current space? I’d call this using the LaunchBar app, it’d be a lot quicker and improve my workflow heaps :slight_smile:

Failing that, at least if the workspace names could be shown alongside the number in the layout tab, I wouldn’t have to go hunting around as much.


If you can use the TotalSpaces2 API you can do it.

It’s not AppleScript, but it could be called from AppleScript I guess.

If you need help I could possibly make a small command line utility for desktop renaming.

Hi Stephen,

If it’s not too much to ask, that would be great if you could :slight_smile: If it could just rename the current space that’s exactly what I’m after. I wouldn’t know where to start with something like that.


I have created a small ruby script that will let you rename the current space using a keyboard shortcut. Full details at:

Contents of the README file from the gist is below.

This setup will let you change the name of the current space by using a keyboard shortcut.


  1. Registered version of TotalSpaces2
  2. CocoaDialog
  3. totalspaces2 ruby gem
  4. BetterTouchTool


  1. Install and register a copy of TotalSpaces2
  2. Download and install CocoaDialog from
  3. Install totalspaces2 ruby gem by entering the following to the Terminal:
    sudo gem install totalspaces2
  4. Install BetterTouchTool (or other alternative that you can configure to run commands using keyboard shortcuts).
  5. Download change-space-name.rb from this gist and place it in your ~/bin directory.
  6. Make the change-space-name.rb script executable by running chmod +x ~/bin/change-space-name.rb in the Terminal.
  7. Edit ~/bin/change-space-name.rb and change line 5 to point to your installed CocoaDialog
    path_to_cocoa_dialog = "/Volumes/Macintosh SSD/Applications/"
  8. Open up BetterTouchTool Preferences, select Keyboard settings, select Global application and click Add New Shortcut. Define a keyboard shortcut (I use Ctrl+Option+Command+R) and change Predefined Action to “Execute Terminal Command”. In the popup dialog enter ~/bin/change-space-name.rb


Hit your predefined keyboard shortcut and enter the desired name for the current space. Profit!

Funny. My need for the very same feature made me switch from mac’s default Spotlight Search to Alfred Powerpack and create my own workflow with some basic TS2 features. Here it is If someone happen to use Alfred as well, I would appreciate some feedback please.