Skip to content

ekalinin/SpaceName

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpaceName

Main features:

  • shows current space id in the menu bar
  • default name can be changed
  • switch to space by name or id from menu

Table of Contents

Installation

SpaceName is an extension for Hammerspoon. Once Hammerspoon is installed, you can install the SpaceName Spoon:

git clone https://github.com/ekalinin/SpaceName.git ~/.hammerspoon/Spoons/SpaceName.spoon

To initialize, add to ~/.hammerspoon/init.lua (creating it if it does not exist):

spaceName = hs.loadSpoon("SpaceName")
if spaceName then
    spaceName
        :start()
        :bindHotkeys({
            -- hotkey to change current space's name
            set={{"ctrl"}, "n"},
            -- hotkey to show menu with all spaces
            show={{"ctrl"}, "m"}
        })
end

Reload the Hammerspoon config.

Usage

Current space id or name

Right after start current space id (or name if it was set) will be shown in the menu bar:

Current space id

Or current space name if it set (see below):

Menu bar with current space id or name

Show all spaces

Click on the space id (or name) to show all available spaces:

All existing spaces

Set custom name

Choose "Set name" in menu bar to set a name for current space:

Set space name

Enter new name:

Enter new name

Menu text will change:

Menu updates

Switch to space by id or name

Click on the space id (or name) to show all available spaces and select one to switch:

Switch to space