0

Compiz has an option to bind a mouse shortcut (eg, Alt+Button7) to raise or lower the window under the mouse.

I find this a very useful way to switch windows.

Is there any way to replicate this shortcut on Cinnamon?

There doesn't seem to be any built-in support for mouse-button shortcuts. The closest I could find (this doesn't actually work) is to set a keyboard shortcut to raise window, then bind that to the mouse using xbindkeys:

# .xbindkeysrc
# Raise window
"xset r off; xdotool key Super+F1; xset r on;"
  Alt + b:7

I verified that they keyboard shortcut works, and xbindkeys works for other actions with the same mouse button, but this binding does nothing (it does type a P in terminal; not sure why).

0

The problem was that my mouse modifier was preventing the keyboard shortcut.

Adding --clearmodifiers to the xdotool command fixes this:

# Raise window
"xset r off; xdotool key --clearmodifiers Super+F1; xset r on;"
  Alt + b:7

# Lower window
"xset r off; xdotool key --clearmodifiers Super+Shift+F1; xset r on;"
  Alt + b:6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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