Rc file pls

hello

My friend’s low-powered (i3 4th gen) desktop runs smoothly with Mabox installed. Thanks to the developers for their hard work! However, my friend faces a minor inconvenience due to their limited fine motor skills. They require the Alt key and mouse to move and resize windows, but these actions are currently mapped to other functions like window snapping. Would someone be so kind as to provide an openbox rc file, or what I should remove/add on the current one, that restores the Alt+mouse movement functionality? Sorry to ask this, I am not familiar with openbox .
Thanks in advance!

Hi @eddy,
Welcome to the forum. :penguin:

Below the default mouse part of the RC.

Alt-Mouse(Right) = resize window.
Alt-Mouse(Left) = dragging window

<mouse>
    <dragThreshold>1</dragThreshold>
    <!-- number of pixels the mouse must move before a drag begins -->
    <doubleClickTime>500</doubleClickTime>
    <!-- in milliseconds (1000 = 1 second) -->
    <screenEdgeWarpTime>400</screenEdgeWarpTime>
    <!-- Time before changing desktops when the pointer touches the edge of the
       screen while moving a window, in milliseconds (1000 = 1 second).
       Set this to 0 to disable warping -->
    <screenEdgeWarpMouse>false</screenEdgeWarpMouse>
    <!-- Set this to TRUE to move the mouse pointer across the desktop when
       switching due to hitting the edge of the screen -->
    <context name="Frame">
      <mousebind action="Press" button="C-S-Left">
        <action name="Execute">
          <command>snapwin</command>
        </action>
      </mousebind>
      <mousebind action="Press" button="A-Left">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind action="Click" button="A-Left">
        <action name="Unshade"/>
      </mousebind>
      <mousebind action="Drag" button="A-Left">
        <action name="Move"/>
      </mousebind>
      <mousebind action="Press" button="A-Right">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind action="Drag" button="A-Right">
        <action name="Resize"/>
      </mousebind>
      <mousebind action="Press" button="A-Middle">
        <action name="Lower"/>
        <action name="FocusToBottom"/>
        <action name="Unfocus"/>
      </mousebind>
      <mousebind action="Click" button="C-A-Up">
        <action name="GoToDesktop">
          <to>previous</to>
        </action>
      </mousebind>
      <mousebind action="Click" button="C-A-Down">
        <action name="GoToDesktop">
          <to>next</to>
        </action>
      </mousebind>
      <mousebind action="Click" button="A-S-Up">
        <action name="SendToDesktop">
          <to>previous</to>
        </action>
      </mousebind>
      <mousebind action="Click" button="A-S-Down">
        <action name="SendToDesktop">
          <to>next</to>
        </action>
      </mousebind>
    </context>
    <context name="Titlebar">
      <mousebind action="Drag" button="Left">
        <action name="Move"/>
      </mousebind>
      <mousebind action="DoubleClick" button="Left">
        <action name="ToggleMaximize"/>
      </mousebind>
      <mousebind action="Click" button="Up">
        <action name="if">
          <shaded>no</shaded>
          <then>
            <action name="Shade"/>
          </then>
        </action>
      </mousebind>
      <mousebind action="Click" button="Down">
        <action name="if">
          <shaded>yes</shaded>
          <then>
            <action name="Unshade"/>
            <action name="Raise"/>
          </then>
        </action>
      </mousebind>
      <mousebind action="Click" button="C-Left">
        <action name="Execute">
          <command>obtctl fontsize increase</command>
        </action>
      </mousebind>
      <mousebind action="Click" button="C-Right">
        <action name="Execute">
          <command>obtctl fontsize decrease</command>
        </action>
      </mousebind>
      <mousebind action="Press" button="W-Right">
        <action name="Execute">
          <command>colorizer-ob -s</command>
        </action>
      </mousebind>
    </context>
    <context name="Titlebar Top Right Bottom Left TLCorner TRCorner BRCorner BLCorner">
      <mousebind action="Press" button="Left">
        <action name="Focus"/>
        <action name="Raise"/>
        <!--<action name="Unshade"/>-->
      </mousebind>
      <mousebind action="Press" button="Middle">
        <action name="Lower"/>
        <action name="FocusToBottom"/>
        <action name="Unfocus"/>
      </mousebind>
      <mousebind action="Press" button="Right">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="ShowMenu">
          <menu>client-menu</menu>
        </action>
      </mousebind>
    </context>
    <context name="Top">
      <mousebind action="Drag" button="Left">
        <action name="Resize">
          <edge>top</edge>
        </action>
      </mousebind>
    </context>
    <context name="Left">
      <mousebind action="Drag" button="Left">
        <action name="Resize">
          <edge>left</edge>
        </action>
      </mousebind>
    </context>
    <context name="Right">
      <mousebind action="Drag" button="Left">
        <action name="Resize">
          <edge>right</edge>
        </action>
      </mousebind>
    </context>
    <context name="Bottom">
      <mousebind action="Drag" button="Left">
        <action name="Resize">
          <edge>bottom</edge>
        </action>
      </mousebind>
      <mousebind action="Press" button="Right">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="ShowMenu">
          <menu>client-menu</menu>
        </action>
      </mousebind>
    </context>
    <context name="TRCorner BRCorner TLCorner BLCorner">
      <mousebind action="Press" button="Left">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind action="Drag" button="Left">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="Client">
      <mousebind action="Press" button="W-Left">
        <action name="Unmaximize"/>
        <action name="Execute">
          <command>deskgrid</command>
        </action>
      </mousebind>
      <mousebind action="Press" button="Left">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind action="Press" button="Middle">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind action="Press" button="Right">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
    </context>
    <context name="Icon">
      <mousebind action="Press" button="Up">
        <action name="Unshade"/>
        <action name="ResizeRelative">
          <bottom>-10</bottom>
          <right>-10</right>
        </action>
      </mousebind>
      <mousebind action="Press" button="Down">
        <action name="Unshade"/>
        <action name="ResizeRelative">
          <bottom>10</bottom>
          <right>10</right>
        </action>
      </mousebind>
      <mousebind action="Press" button="Left">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
        <action name="ShowMenu">
          <menu>client-menu</menu>
        </action>
      </mousebind>
      <mousebind action="Press" button="Right">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="ShowMenu">
          <menu>client-menu</menu>
        </action>
      </mousebind>
    </context>
    <context name="AllDesktops">
      <mousebind action="Press" button="Up">
        <action name="Unshade"/>
        <action name="ResizeRelative">
          <right>-10</right>
        </action>
      </mousebind>
      <mousebind action="Press" button="Down">
        <action name="Unshade"/>
        <action name="ResizeRelative">
          <right>10</right>
        </action>
      </mousebind>
      <mousebind action="Press" button="Left">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind action="Click" button="Left">
        <action name="ToggleOmnipresent"/>
      </mousebind>
    </context>
    <context name="Shade">
      <mousebind action="Press" button="Up">
        <action name="Unshade"/>
        <action name="ResizeRelative">
          <bottom>-10</bottom>
        </action>
      </mousebind>
      <mousebind action="Press" button="Down">
        <action name="Unshade"/>
        <action name="ResizeRelative">
          <bottom>10</bottom>
        </action>
      </mousebind>
      <mousebind action="Press" button="Left">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind action="Click" button="Left">
        <action name="ToggleShade"/>
      </mousebind>
    </context>
    <context name="Iconify">
      <mousebind action="Press" button="Up">
        <action name="Unshade"/>
        <action name="ResizeRelative">
          <bottom>-10</bottom>
        </action>
      </mousebind>
      <mousebind action="Press" button="Down">
        <action name="Unshade"/>
        <action name="ResizeRelative">
          <bottom>10</bottom>
        </action>
      </mousebind>
      <mousebind action="Press" button="Left">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind action="Click" button="Left">
        <action name="Iconify"/>
      </mousebind>
    </context>
    <context name="Maximize">
      <mousebind action="Press" button="Up">
        <action name="Unshade"/>
        <action name="ResizeRelative">
          <left>-10</left>
        </action>
      </mousebind>
      <mousebind action="Press" button="Down">
        <action name="Unshade"/>
        <action name="ResizeRelative">
          <left>10</left>
        </action>
      </mousebind>
      <mousebind action="Press" button="Left">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind action="Press" button="Middle">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind action="Press" button="Right">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind action="Click" button="Left">
        <action name="ToggleMaximize"/>
      </mousebind>
      <mousebind action="Click" button="Middle">
        <action name="ToggleMaximize">
          <direction>vertical</direction>
        </action>
      </mousebind>
      <mousebind action="Click" button="Right">
        <action name="ToggleMaximize">
          <direction>horizontal</direction>
        </action>
      </mousebind>
    </context>
    <context name="Close">
      <mousebind action="Press" button="Up">
        <action name="Unshade"/>
        <action name="ResizeRelative">
          <bottom>-10</bottom>
          <left>-10</left>
        </action>
      </mousebind>
      <mousebind action="Press" button="Down">
        <action name="Unshade"/>
        <action name="ResizeRelative">
          <bottom>10</bottom>
          <left>10</left>
        </action>
      </mousebind>
      <mousebind action="Press" button="Left">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind action="Click" button="Left">
        <action name="Close"/>
      </mousebind>
    </context>
    <context name="Desktop">
      <mousebind action="Click" button="A-Up">
        <action name="GoToDesktop">
          <to>previous</to>
        </action>
      </mousebind>
      <mousebind action="Click" button="A-Down">
        <action name="GoToDesktop">
          <to>next</to>
        </action>
      </mousebind>
      <mousebind action="Click" button="C-A-Up">
        <action name="GoToDesktop">
          <to>previous</to>
        </action>
      </mousebind>
      <mousebind action="Click" button="C-A-Down">
        <action name="GoToDesktop">
          <to>next</to>
        </action>
      </mousebind>
      <mousebind action="Press" button="Left">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind action="Click" button="Left">
        <action name="Execute">
          <command>conkyctl cmdmenu</command>
        </action>
      </mousebind>
      <mousebind action="Press" button="Right">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind action="Click" button="Right">
        <action name="Execute">
          <command>conkyctl contextmenu</command>
        </action>
      </mousebind>
      <mousebind action="Click" button="Down">
        <action name="Execute">
          <command>conkyctl contextmenu</command>
        </action>
      </mousebind>
      <mousebind action="Press" button="C-Left">
        <action name="Execute">
          <command>conkyctl makemoveableall</command>
        </action>
      </mousebind>
    </context>
    <context name="Root">
      <!-- Menus -->
      <mousebind action="Click" button="Up">
        <action name="GoToDesktop">
          <to>none</to>
        </action>
      </mousebind>
      <mousebind action="Click" button="Down">
        <action name="GoToDesktop">
          <to>none</to>
        </action>
      </mousebind>
      <mousebind action="Press" button="Left">
        <action name="ToggleShowDesktop"/>
      </mousebind>
      <mousebind action="Press" button="C-Left">
        <action name="Execute"><command>skippy-xd-fix</command>tuta
        </action>
      </mousebind>
      <mousebind action="Press" button="Middle">
        <action name="Execute">
          <command>jgdesktops -s</command>
        </action>
      </mousebind>
      <mousebind action="Press" button="Right">
        <action name="Execute">
          <command>mb-jgtools main</command>
        </action>
      </mousebind>
      <!--<mousebind action="Press" button="Middle">
        <action name="ShowMenu">
          <menu>client-list-combined-menu</menu>
        </action>
      </mousebind>-->
      <mousebind action="Press" button="A-Right">
        <action name="ShowMenu">
          <menu>root-menu</menu>
        </action>
      </mousebind>
    </context>
    <context name="MoveResize">
      <mousebind action="Click" button="Up">
        <action name="GoToDesktop">
          <to>previous</to>
        </action>
      </mousebind>
      <mousebind action="Click" button="Down">
        <action name="GoToDesktop">
          <to>next</to>
        </action>
      </mousebind>
      <mousebind action="Click" button="A-Up">
        <action name="GoToDesktop">
          <to>previous</to>
        </action>
      </mousebind>
      <mousebind action="Click" button="A-Down">
        <action name="GoToDesktop">
          <to>next</to>
        </action>
      </mousebind>
    </context>
  </mouse>

Some other commands…

Alt-m = move window (arrow key’s)
Alt-r = resize window (arrow key’s)

:bird:

2 Likes

oh wow… thanks a bunch for the quick response! You’re a real lifesaver. Sorry to bug you again, but is the window snapping feature built into Openbox or does it require an extra app? Just curious, tia

That’s a good question for @napcok , I am not familier enough with the snapping part.

I quess it’s Coretile. (middle click desktop, menu at the bottom)

:bird:

Hello @eddy and welcome to the forum,

I’m not sure if I understand your question correctly…

Alt + Left mouse drag is for moving windows
Alt + Right mouse drag is for resize windows
And this is default configuration in Mabox (I believe most of desktop environments use that also, not only Openbox)

Edit:
There are many ways for windows snapping in Mabox.
For example:

  1. super + arrows
  2. Ctrl + Shift + Left mouse click inside window

2 Likes

off topic… @napcok

how do you implement this part. [the box]
Mabox_20231213-12-37-33

:bird:

Hi @muzqs :slight_smile:

  1. super + arrows use Openbox actions and it is configured in rc.xml

example:

<keybind key="W-Right">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>100%</height>
        <x>50%</x>
        <y>0%</y>
      </action>
    </keybind>
  1. ctrl + shift + Left click inside window is custom script called snapwin - do not look inside it, if you care about your mental health (My hair turned white while I was writing it) :wink:
1 Like

Interesting page…

https://manual.maboxlinux.org/en/getting-started/keyboard-shortcuts/

:bird:

I am sorry i think i am not clear with my question.
The question is:

When posting on the forum and want to show the key combination in a nice way, how to get the box with the txt inside in it.

“super + arrows” in a nice way.

:wink:

1 Like

help mycommand … Thanks.

Hi @napcok

ough guys… it seems that something is wrong with my friend’s keyboard !! I really apologise for the mix up! I just tested the live iso on my desktop and works as advertised, alt+ mouse buttons like other desktops, but when I tried the same USB on my friend’s system, the same combination brings that ‘windows grid’ (as I see now on the live iso) app, this normally comes up when I use the Super key, not with the Alt key, so I am suspecting his keyboard has issues… #facepalm

mods can close this topic, as ‘solved’ thanks and sorry again!

EDIT: this manjaro spin is so nice… I just trashed my XFCE installation in favour of this, really really smooth! :blush:

2 Likes