I'm trying to make my two bottom corners switch between workspaces. The solution I had in mind was to create a custom script which would switch between workspaces based on the argument you pass into it.

For my script, I had to install: sudo apt-get install wmctrl

And my script is this (which works btw):

work=`wmctrl -d` | grep '*' | grep -o '^[0-9]'
if [[ $1 == "left" ]]; then
  wmctrl -s $((work - 1))
  wmctrl -s $((work + 1))

I then realized that you can only have one custom command (˃̣̣̥᷄⌓˂̣̣̥᷅ ) ... So I can't place left and right into the arguments for my script.

Did anyone find a way to get hot corners working this way?

  • I have a problem with the script of the cuestion it only moves to the window 1. The line: work=wmctrl -d | grep '*' | grep -o '^[0-9]' always return 0 on the variable work. Any ideas? Commented Feb 9, 2017 at 19:49

1 Answer 1


There is a way and it is actually has been explained in I believe /org/pantheon/desktop/behavior which is seems like settings area that we can access with dconf-editor (or you can see .xml version of it at /usr/share/glib-2.0/schemas/org.pantheon.desktop.gala.gschema.xml)

It says;

If you just put a single command, it will be used for every hotcorner assigned to 'custom-command'. If you instead use the pattern 'hotcorner-topleft:command;;hotcorner-bottomright:command' the specific commands will be used per hotcorner. Possible identifiers are 'hotcorner-[topleft; topright; bottomleft; bottomright]' followed by a ':' and then the command. ';;' is used as delimiter between command defintions.

So I am using a devilspie command for minimizing all windows as you can find from here How can I view the desktop? which requires for me to write :

devilspie /home/[user]/minimize.ds

at Custom Command are of System-Settings / Desktop / Hot Corners.

Also I have to choose bottom-right (my choice) hot corner as Execute Custom Command right.

However, as in your case if I want to use a custom command at bottom-left hot corner e.g. firefox, I have to change my custom code as:

hotcorner-bottomleft:firefox;;hotcorner-bottomright:devilspie /home/[user]/minimize.ds

after that simply choosing both bottom corners as Execute Custom Command will be enough to solve your problem.

So if your left argument code is at /home/[user]/left.sh and if your right argument code is at /home/[user]/right.sh.


should solve it.

P.S.: This answer was for assuming you wanted to create two different custom script for each left and right arguments and use them in different corners.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.