In MATE there are default shortcuts to switch workspace, by default Ctrl+Alt+arrows keys in the shortcuts manager.
I would like to add other shortcuts to switch workspace (Ctrl+Alt+hjkl)), while keeping the original ones. For this I need the command which is run when we switch workspace.
Does anyone know it?
EDIT:
I found a way to switch workspaces from the terminal (wmctrl -s $(wmctrl -d | grep "*" | awk '{print $1+1}')
), but it does not work with shortcuts. I open a new question.
EDIT 2:
@Zanna, @N0rbert, @EricCarvalho, @karel, @DavidFoerster: before marking this question as duplicate, did you read both questions !? And did you saw that I ask both questions ?
I asked here, if there was a command to switch workspace, and danzel helped me to find it (not you Zanna, is it why you marked it as duplicate !?). But this command did not work with shortcuts.
The other question is "how to make this command work with shortcuts" ?
So yes I think both are different !
wmctrl
we can only go to a specifique workspace, it could be good if I have a way to know the id of the workspace in which I am. – Phantom Mar 16 '18 at 10:18wmctrl -d
should give you that information. I do, however, understand that writing a script which parses the information and switches to the correct workspace may be tedious, especially if compiz is used and one has to calculate the correct viewport. I hope that someone has an easier solution. – danzel Mar 16 '18 at 11:08xdotool key --clearmodifiers ctrl+alt+Right
. – danzel Mar 16 '18 at 11:46grep
andawk
. I'll look at this – Phantom Mar 16 '18 at 12:13