humpty > promotes Linux  > Lubuntu Tips

Lubuntu linux Tips
 
Keyboard Shortcuts to Move Windows (LXQt)



Note: Since Lubuntu 20.04, LXQt is the default session manager.

K
eyboard shortcuts are available via Preferences > LXQt Settings > Shortcut Keys.

You can assign a shorcut to call a script.

Below is the script that moves or resizes a window.
It relies on wmctrl, and xwininfo.
1.     
Install wmctrl
sudo apt install wmctrl
2.      
Download this script  wmove.sh (right-click and save-link-as, to somewhere.
Alternatively, you can view, copy and paste the script here. Be sure to rename your file as wmove.sh.

Put this script somewhere where it can be found and executed, e.g /usr/local/bin/wmove.sh
and make it executable.
You can test the script inside a terminal. e.g wmove.sh moveup
and the terminal should move up a tenth of it's height.
3.
Enter these shortcuts to call the script wmove.sh
Preferences > LXQt Settings > Shortcut Keys.

Shortcut Description Command
Resizing


Control+Meta+Up 
Win Shrink Height (1/10) wmove.sh decheight
Control+Meta+Down Win Grow Height
wmove.sh incheight
Control+Meta+Left
Win Shrink Width
wmove.sh decwidth
Control+Meta+Right Win Grow Width
wmove.sh incwidth
Moving


Alt+Meta+Up  
Win Move Up (1/10) wmove.sh moveup
Alt+Meta+Down
Win Move Down
wmove.sh movedown
Alt+Meta+Left Win Move Left
wmove.sh moveleft
Alt+Meta+Right Win Move Rightf    wmove.sh moveright
Quadrants


Meta+Up    Win Top Half wmove.sh tophalf
Meta+Down
Win Bottom Half
wmove.sh bothalf
Meta+Left   
Win Left Half 
wmove.sh lefthalf
Meta+Right  
Win Right Half  
wmove.sh righthalf

(Meta is the special key on the keyboard with the 'windows' symbol)
The shortcut keys will move and resize the current window to the sides of the screen.

That's it !

More Lubuntu Tips