DeskGrid - place windows on grid - with or without gap (beta)

This is a slightly larger project that I won’t finish in a few days, so if you have some time and feel good as a beta tester, please try it out and share your feedback.

DeskGrid is a first (of three) piece of a bigger planned feature - ability to save and restore “desktop sessions” (all windows from one virtual desktop - with their size, position and state, decorated or not).

Current state of all three pieces:

  1. Deskgrid - progress: 90% - ready to some tests
  2. Session manager DeskMngr - 80%
  3. Dynamic menu to make two above user friendly - 99%

DeskGrid is to help you place windows precisely on the grid (with or without gap)


How to test/play with it?

Update system to get latest mabox-tools.
Make sure you have dependencies installed:

yay -S feh slop

Get latest rc.xml config

mb-reset obrcxml

or add to rc.xml (context name=“Frame”)
those lines:

     <mousebind action="Press" button="C-S-Left">
        <action name="UnmaximizeFull"/>
        <action name="Execute">

in case you edit rc.xml by hand run:

openbox --reconfigure

Now you can use Ctrl + Shift + LeftMouseButton to click on the window and play with it.

To see Grid Helper as a background run command:


You can add it to left panel by:

echo "DeskGrid Helper,drawgrid" >> ~/.config/mabox/places-prepend.csv



This is an excellent idea and seems to be working fine so far. I’ll do some more testing.
Thank you

1 Like

Hi @piquet and welcome to the forum :slight_smile:
Thanks for your interest and testing.

Btw… I’m almost ready with the next tool, tentatively called DeskMngr: which allows you to save and restore all windows from the virtual desktop.
I’ll try to share it and write about it later today.

Only one minor problem so far. Deskgridhelper does not play nice on dual screen setup.
The image (/tmp/grid.png) is correctly calculated and created but then is displayed only on the primary display. This also puts the help text off screen. This is not a deal-breaker but I thought I would point it out so that others may be made aware of it.

Looking forward to trying deskgrid :smile:

Thanks for info.
I don’t have experience with multimonitor setup unfortunately - maybe in the future :wink:

Can you share output from wmctrl -d and xrandr --listmonitors commands?


0  - DG: 3840x1080  VP: 0,0  WA: 0,38 3840x1010  Home
1  - DG: 3840x1080  VP: 0,0  WA: 0,38 3840x1010  Multimedia
2  * DG: 3840x1080  VP: 0,0  WA: 0,38 3840x1010  Office
3  - DG: 3840x1080  VP: 0,0  WA: 0,38 3840x1010  Graphics
4  - DG: 3840x1080  VP: 0,0  WA: 0,38 3840x1010  Development
5  - DG: 3840x1080  VP: 0,0  WA: 0,38 3840x1010  Network
xrandr --listmonitors
Monitors: 2
 0: +*HDMI1 1920/480x1080/270+0+0  HDMI1
 1: +VGA1 1920/480x1080/270+1920+0  VGA1

The two monitors are side by side with the HDMI on the left. The grid.png image is pushed all the way to the left of the HDMI monitor leaving no image on the right VGA monitor and the help text is then off-screen. Maybe feh could be configured to compensate although I have never used it.

I wouldn’t spend too much time on this as users of multi-monitor set ups don’t need to be so tidy with their layouts and the deskgrid is pretty intuitive in use anyway.

You are doing a great job here. I have been using Linux for over 20 years and arch based distros for over 10 and this is the nicest implementation so far.

1 Like

I’m not sure if this will work, but you can try:

feh -N -x -g 3840x1010 --title "DrawGrid helper" /tmp/grid.png

Yes that works. Thanks, sorry for the delay in replying.

1 Like