You are not logged in.

#1 2023-04-24 06:46:25

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,558
Website

window snapping script?

The idea of a window-snapping script has come up now and then over the years:
eg
https://forums.bunsenlabs.org/viewtopic … 091#p62091

Damo wrote:

We include some basic functionality ATM, and my experience is that
a comprehensive tiling script isn't a straightforward thing to perfect.
There are so many corner cases, misbehaving windows (terminals!),
1/2/N monitors, primary left/right/above/below hmm

Mine works great for me, but I kinda gave up on bunsenifying it
for the reasons above. It is also quite complex to set up,
with bl-rc.xml keybinds and possible clashes.

I suggest we make it a major objective for Beryllium-dev

We didn't touch it for Beryllium (ran out of time); does anyone feel like rolling their sleeves up and playing with leonardo.marco's script in the above link?


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#2 2023-04-24 07:55:49

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,740

Re: window snapping script?

Do we a have a resolution on how exactly should things behave? (I was happy with alt+z and alt+x to cover left 50% and right 50% and alt+c to horizontal center. There was another one that could clone window size from one to another (rarelly used)).

Offline

#3 2023-04-24 08:21:01

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,558
Website

Re: window snapping script?

At the moment there are eg keybinds to resize windows to 100% height 50% width and move them left or right.
I don't really know what more a window-snapping script can do, but there are issues with the current keybinds, eg you can't go back to the previous state.

What we ship atm:

    <keybind key="W-Right">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>100%</height>
        <x>-0</x>
        <y>0</y>
      </action>
    </keybind>
    <keybind key="W-Left">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>100%</height>
        <x>0</x>
        <y>0</y>
      </action>
    </keybind>
    <keybind key="W-Down">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <width>100%</width>
        <height>50%</height>
        <x>0</x>
        <y>-0</y>
      </action>
    </keybind>
    <keybind key="W-Up">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <width>100%</width>
        <height>50%</height>
        <x>0</x>
        <y>0</y>
      </action>
    </keybind>
    <keybind key="W-A-Right">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>50%</height>
        <x>-0</x>
        <y>0</y>
      </action>
    </keybind>
    <keybind key="W-A-Left">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>50%</height>
        <x>0</x>
        <y>-0</y>
      </action>
    </keybind>
    <keybind key="W-A-Down">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>50%</height>
        <x>-0</x>
        <y>-0</y>
      </action>
    </keybind>
    <keybind key="W-A-Up">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>50%</height>
        <x>0</x>
        <y>0</y>
      </action>
    </keybind>

As to what should happen, I have no idea.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#4 2023-04-24 11:25:50

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,558
Website

Re: window snapping script?

I guess there's no consensus because the discussion faded out when Damo retired.

Maybe the safe way to go would be to change the existing keybinds as little as possible, just make them work better?

leonardo's script above uses xdotool to move windows - I guess something like that would be necessary, plus a script to remember previous geometry. It might not be easy...


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

Board footer

Powered by FluxBB