Renaming i3 workspaces while keeping navigation prefixes

I navigate my i3 workspaces using named workspaces of the format <number>:<key>, for example 1:s. The number keeps them in the same order in my workspace-list and the key is what I press to navigate them.

Sometimes I have a lot of windows open on many workspaces and begin to lose track of what's where. So I want to give workspaces appropriate names when needed while keeping the <number>:<key> prefix for navigation.

Out of the box the renaming in i3 isn't as convenient as I'd like, so I wrote this small Python script using i3ipc-python and added bindsym Mod4+q exec "python ~/.i3/renameworkspace.py" to my config.

This increases my productivity by at least .7% 🙌

New Year's Update:

Keep in mind to use workspace number instead of just workspace when moving between workspaces. Using strip_workspace_numbers yes in the i3bar removes the <number>: prefix and looks better.

bindsym $mod+1 workspace number 1:chat
bindsym $mod+Shift+1 move container to workspace number 1:chat 
bindsym $mod+q exec "python ~/.i3/renameworkspace.py"
bar {
    strip_workspace_numbers yes
    status_command python ~/.i3/i3status.py
}