You are not logged in.

#1 2023-02-10 16:10:26

beng
Member
Registered: 2015-09-29
Posts: 81

Window snapping via keybinds (& mouse)

Hi

Following issues with my secondary screen, i was looking for a window snapping script (there used to be a script to do it) but I could not find anything re. the functionality on the forum; i found a solution here and I am posting it for the sake of those who would also need such a functionality (the post also includes a window snapping with the mouse option but I have not tested it)

window snapping with keybinds, just add the code below to your .config/openbox/bl-rc.xml in your home directory:

<!-- Keybindings for window snapping -->
	<keybind key="W-Left">        # HalfLeftScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>0</x><y>0</y><height>97%</height><width>50%</width></action>
	</keybind>
	<keybind key="W-Right">       # HalfRightScreen
	  <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>-0</x><y>0</y><height>97%</height><width>50%</width></action>
	</keybind>
	<keybind key="W-Up">          # HalfUpperScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>0</x><y>0</y><width>100%</width><height>50%</height></action>
	</keybind>
	<keybind key="W-Down">        # HalfLowerScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>0</x><y>-0</y><width>100%</width><height>50%</height></action>
	</keybind>

' hope this helps.

Offline

#2 2023-02-20 14:21:28

Jimbo_G
Member
From: France
Registered: 2017-05-12
Posts: 326

Re: Window snapping via keybinds (& mouse)

Thanks, I always felt like this should have worked out of the box, maybe I used to use that script. One of the few things that actually works quite well on Windows 11!

Offline

Board footer

Powered by FluxBB