Creating a new workspace
asked 2015-05-19 13:52:41 +0000
This post is a wiki. Anyone with karma >100 is welcome to improve it.
I want to be able to open a new workspace with a simple keyboard shortcut, without having to press an unused number key. I found this command:
i3-msg workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
from here: https://github.com/sandeel/i3-new-wor...
If I just enter it on my terminal it works exactly as advertised but when I add it to the config file like this:
bindsym $mod+n exec i3-msg workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
and reload the config file, pressing $mod+n doesn't result in a new workspace.
I'm new to i3 and I'm sure I'm missing something very obvious, but I just can't figure it out.