Get current workspace #?

You can get how many workspace there are from the settings
message ${XDG_CONFIG_HOME}/system/app_server/workspaces
with a pinch of gawk you can do rows*columns to get it
message ${XDG_CONFIG_HOME}/system/app_server/workspaces | awk 'BEGIN{i=1} /columns/,/rows/ {i=i*$(NF-1)} END{print i}' FS='[^0-9]'

I don’t know how to get the current workspace, perhaps with a trick, opening a new tracker window and getting its workspace with hey
hey Tracker get Workspaces of Window $(hey Tracker count of Window | awk '/result/ {print $4-1}') | awk '/result/ {print 1+log($4)/log(2)}'

1 Like