Shortcut for displaying 2 windows?

Hi all,

I´ve got a question regarding dealing with open windows.

When using Lubuntu bionic I could easily make any open window use exactly half of the monitor display with the help of a shortcut like so:

WIN-key + ARROW LEFT or WIN-key + ARROW RIGHT. That was an easy and fast way e.g. for having two browser windows open for comparison tasks.

I noticed that this very shortcuts don´t work any more now (in Lubuntu focal).
So is there another way of achieving that goal :question:

Thanks a lot in advance. :slightly_smiling_face:

Many greetings.
Rosika

Hi,

I just found out that this very topic seems to have been discussed already (How to snap windows? - #3 by marinaraman ).

Well, editing ~./config/openbox/lxqt-rc.xml would certainly be an option for me.

That uses the Windows and arrow keys to do the dirty work, but in 19.04+, you’ll run into conflicts with lxqt-globalkeys using the key to open the menu, so either disable that, reconfigure that, or use something other than the Windows key here.

I wouldn´t insist on using the WIN key and I´d be happy with the combination of e.g. “B plus ARROW LEFT” .

What I don´t quite understand in the post:

<keybind key="W-Left">
    <action name="UnmaximizeFull"/>
    <action name="MaximizeVert"/>
    <action name="MoveResizeTo">
        <width>50%</width>
    </action>
    <action name="MoveToEdge"><direction>west</direction></action>
</keybind>
<keybind key="W-Right">
    <action name="UnmaximizeFull"/>
    <action name="MaximizeVert"/>
    <action name="MoveResizeTo">
        <width>50%</width>
    </action>
    <action name="MoveToEdge"><direction>east</direction></action>
</keybind>
<keybind key="W-Down">
   <action name="Unmaximize"/>
</keybind>
<keybind key="W-Up">
   <action name="Maximize"/>
</keybind>

is what keybind key=“W-Left” means. Does this refer to the WIN-key or to the “W”-key? In my case I´d like to use the “B”-key.

Thanks in advance.
Greetings.
Rosika :slightly_smiling_face:

2 Likes

Hi,

Look at this post:

There you can see how to resize windows using [Control]+[Shift]+[arrows].
I have tried it and it works very well.

Regards.

3 Likes

Hi @ubun-ie,

thank you very much for you solution and even trying it out for me. :relaxed:

I just wanted to edit my lxqt-rc.xml file but am unsure now where exactly to put the new keybindings.

Presently I have to following headings referring to keybindings:

    Keybindings for desktop switching 
    Keybindings for windows
    Keybindings for window switching 
    Keybindings for window switching with the arrow keys 

Personally I´d think the last one would be the right one but I´d like to ask you first (in order to be absolutely sure :wink:).

Thanks so much.
Many greetings from Rosika :slightly_smiling_face:

1 Like

Hi,
Some instructions:
i) Make a copy of the “lxqt-rc.xml” original file. If something goes wrong you have a backup file.
ii) In the “lxqt-rc.xml” file find the keyboard section. There are only two words in all the file written as “/keyboard” (with <>)
All between the two “/keyboard” words (with <>) is the keyboard section.
iii) Before the last “/keyboard” word (with <>) and after the last “/keybind” (with <>) insert this:

<!-- Keybindings for resize windows 03/22/2021 Rosika-->
<keybind key="C-S-Left">
  <action name="UnmaximizeFull"/>
  <action name="MoveResizeTo">
    <width>50%</width>
    <height>100%</height>
    <x>0%</x>
    <y>0%</y>
  </action>
</keybind>
<keybind key="C-S-Right">
  <action name="UnmaximizeFull"/>
  <action name="MoveResizeTo">
    <width>50%</width>
    <height>100%</height>
    <x>50%</x>
    <y>0%</y>
  </action>
</keybind>
<keybind key="C-S-Down">
  <action name="UnmaximizeFull"/>
  <action name="MoveResizeTo">
    <width>100%</width>
    <height>50%</height>
    <x>0%</x>
    <y>50%</y>
  </action>
</keybind>
<keybind key="C-S-Up">
  <action name="UnmaximizeFull"/>
  <action name="MoveResizeTo">
    <width>100%</width>
    <height>50%</height>
    <x>0%</x>
    <y>0%</y>
  </action>
</keybind>

I think that, that’s all.

Greetings.

3 Likes

@ubun-ie:

Hello again and thank you so much for providing such a detailed method of achieving the goal. :+1:

I did exactly what you suggested and it works perfectly.

That´s just the one thing that´s different with my file. With me there´s only one instance of “/keyboard” (with<>) (the one that finishes the section).

At the beginning there´s just “keyboard” (with <>), i.e. without the slash.
It seems the slash is used as an end-marker (at least that´s my guess :blush:).

Anyhow, I inserted the code you provided as you suggested and after performing
openbox --reconfigure it works really fine now.

That´s so cool. :laughing:

So thank you very much for all the time and effort you put into helping me. It´s highly appreciated.

Many greetings and stay safe. :wave:
Rosika :slightly_smiling_face:

2 Likes

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.