I found an i3 workspaces module I really liked at /r/unixporn so I modded it to suit.
Polybar Module
[module/i3]
type = internal/i3
; Only show workspaces defined on the same output as the bar
;
; Useful if you want to show monitor specific workspaces
; on different bars
;
; Default: false
pin-workspaces = false
; This will split the workspace name on ':'
; Default: false
strip-wsnumbers = true
; Sort the workspaces by index instead of the default
; sorting that groups the workspaces by output
; Default: false
index-sort = true
; Create click handler used to focus workspace
; Default: true
enable-click = true
; Create scroll handlers used to cycle workspaces
; Default: true
enable-scroll = true
; Wrap around when reaching the first/last workspace
; Default: true
wrapping-scroll = true
; Set the scroll cycle direction
; Default: true
reverse-scroll = false
; Use fuzzy (partial) matching on labels when assigning
; icons to workspaces
; Example: code;♚ will apply the icon to all workspaces
; containing 'code' in the label
; Default: false
fuzzy-match = true
; ws-icon-[0-9]+ = label;icon
; NOTE: The label needs to match the name of the i3 workspace
ws-icon-0 = term;
ws-icon-1 = ffox;
ws-icon-2 = email;
ws-icon-3 = file;
ws-icon-4 = music;
ws-icon-5 = gimp;
ws-icon-6 = edit;
ws-icon-7 = torr;
;ws-icon-default =
; Available tags:
; <label-state> (default) - gets replaced with <label-(focused|unfocused|visible|urgent)>
; <label-mode> (default)
format = <label-state> <label-mode>
; Available tokens:
; %mode%
; Default: %mode%
label-mode = %mode%
label-mode-padding = 5
label-mode-background = ${colors.background}
; Available tokens:
; %name%
; %icon%
; %index%
; %output%
; Default: %icon% %name%
label-focused = %icon% %name%
label-focused-foreground = ${colors.foreground}
label-focused-background = ${colors.background}
label-focused-underline = #b13f47
label-focused-padding = 5
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
label-unfocused = %icon% %name%
label-unfocused-foreground = ${colors.foreground}
label-unfocused-background = ${colors.background}
label-unfocused-padding = 5
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
label-visible = %icon% %name%
label-visible-underline = #555555
label-visible-padding = 5
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
label-urgent = %icon% %name%
label-urgent-foreground = ${colors.foreground-alt}
label-urgent-background = ${colors.background}
label-urgent-padding = 5
i3 config for workspaces:
set $WS1 "1:term"
set $WS2 "2:ffox"
set $WS3 "3:email"
set $WS4 "4:file"
set $WS5 "5:music"
set $WS6 "6:gimp"
set $WS7 "7:edit"
set $WS8 "8:torr"
For this to work, the workspaces have to be named the same in both the module and i3 config.
I got the original config from this amazing post.
What it looks like: