The default Keyboard Shortcuts in Ubuntu to maximize a window (Super+Up) or snap it to the sides (Super+Left/Right) relates to the current active window.
While setting up mouse gestures using logiops
, I found out that this is a weird behavior.
I rather want to maximize/minimize/snap affect the window below my mouse pointer just like the scroll wheel does.
How to do this, e.g. using xdotool
?
You can use
xdotool
to get the window at the current mouse location (getmouselocation
) and then the commandswindowminimize
orwindowactivate
+key
.I made a little script
~/bin/xdowindow
(and made it executable usingchmod +x
):Set custom keyboard shortcuts:
And then use them in
logiops
setup:Note:
xdotool
won't work together withwayland
, maybeydotool
can be used then. I will test once I usewayland
myself or someone else may jump in and translate the tool.