5
2
I'm currently setting up a new Cinnamon environment, and all my shortcuts are working properly. I managed to find this script online which I've bound to allow me to move windows between monitors:
#!/bin/bash
#get the window geometry
widthHeight=( $(wmctrl -l -G | grep -v ' \-1 ' | awk 'END{print $5,$6}' ))
#toggle if $1 is set and set to left - move window to left
if [[ ! -z $1 ]]; then
if [[ $1 == "left" ]]; then
#this window is in another screen
wmctrl -r ":ACTIVE:" -e 0,0,0,${widthHeight[0]},${widthHeight[1]}
else
wmctrl -r ":ACTIVE:" -e 0,1920,0,${widthHeight[0]},${widthHeight[1]}
fi
fi
However, it doesn't work if the window is either maximized or snapped to either side of the monitor. Does anyone know how to modify this script so that it will ALWAYS move the window to the next monitor?
I don't think this answers the question. The question is how to modify the script in the OP. This combination of keys might do something (it's not clear what from the context) but you need to explain how that fits into the script. – Darren – 2017-11-27T13:53:20.723
I think this was asked when Cinnamon was unable to do this natively. Is this any better? – tsusanka – 2017-11-27T13:57:28.553
Ah, OK. In that case, thanks for clarifying. – Darren – 2017-11-27T13:58:52.603