My question is something like this - but I don't want to open a given application on a specific workspace, I want each instance to open on a new workspace each time.
The OP in the linked-to question wants to open Firefox on workspace 2, Chromium on workspace 1, etc...
I want to open new instances of a text-editor (Sublime Text) in a new workspace for every new instance. Is this possible?
solution:
I used the accepted answer in a modified form:
# .bashrc
...
function sublime {
i3-msg workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
/usr/bin/sublime_text_3/sublime_text $1
}
so that I can use it like this:
$ sublime /path/to/file
and also because I'm using my dotfiles across several computers, so it's nicer to include everything in one place!