23/05/2016

[LXDE] LUbuntu desktop composition enable key shortcuts

The openbox window manager bundled with LUbuntu is powerful enough to provide the same functionality as similar applications, but it's unfortunately delivered with a barebone configuration.

One functionality I'm missing it's the ability to drag, resize and snap windows to desktop sides. Luckily I found code pieces to enable such functionality, albeit not via mouse controls but key combinations; to add it, simply edit ~/.config/openbox/lubuntu-rc.xml and add under the line
 <chainQuitKey>C-g</chainQuitKey>  

this code:
 <keybind key="W-Left">    # HalfLeftScreen  
  <action name="UnmaximizeFull"/>  
  <action name="MoveResizeTo">  
   <x>0</x>  
   <y>0</y>  
   <height>100%</height>  
   <width>50%</width>  
  </action>  
 </keybind>  
 <keybind key="W-Right">    # HalfRightScreen  
  <action name="UnmaximizeFull"/>  
  <action name="MoveResizeTo">  
   <x>-0</x>  
   <y>0</y>  
   <height>100%</height>  
   <width>50%</width>  
  </action>  
 </keybind>  

Then just do an openbox --restart

You can now use the Windows key (Super) and the right or left arrow to snap the currently active window to the right or left side of the screen, at 50% width

Note: apparently openbox is reserving some space for the toolbar on the bottom of the screen, so even declaring 100% height will NOT fill all available space after resizing.

No comments:

Post a Comment

With great power comes great responsibility.

Da grandi poteri derivano grandi responsabilità.