linuxmint / cinnamon-desktop

The cinnamon-desktop library (and common settings schemas for the cinnamon desktop)
GNU General Public License v2.0
190 stars 63 forks source link

Command to create new Workspace #118

Open DanitiKain opened 6 years ago

DanitiKain commented 6 years ago

gsettings set org.cinnamon.desktop.wm.preferences num-workspaces 4

I found this command will create whatever number you specificy. However I want a way to create a new workspace without having to know how many are already created. The use case for this is to create a shortcut key to add a new workspace no matter how many exist already. I do this in xfce as it has a command to create a new workspace.

JosephMcc commented 6 years ago

Not sure how you are going about linking this to a shortcut key. If you are doing some sort of script you could read the value of the key and then set it to the current value +1. There is also an _addWorkspace() function in Main.js.

smurphos commented 4 years ago

You can use this command in a keyboard shortcut to create and jump to a new workspace.

sh -c 'dbus-send --dest=org.Cinnamon --print-reply /org/Cinnamon org.Cinnamon.JumpToNewWorkspace>/dev/null'

mtwebster commented 4 years ago

Just fyi, I wrote a script a while back to access cinnamon's dbus interface (I got tired of having to figure out dbus-send every time I wanted to use it).

So you could just do:

 /usr/share/cinnamon/cinnamon-dbus-command JumpToNewWorkspace