#!/usr/bin/fish

if count $argv
  set ws $argv[1]
else
  set ws (i3-msg -t get_workspaces | jq --raw-output '.[]|select(.focused == true).name')
end
set script ~/.workspaces/$ws.focus

if type -q $script
  $script
else
  i3-msg mode default
end