How to get some window tiling features in Jwm and other window managers

Moderator: Forum moderators

Post Reply
TurtleX
Posts: 24
Joined: Fri Dec 02, 2022 4:20 pm
Been thanked: 1 time

How to get some window tiling features in Jwm and other window managers

Post by TurtleX »

How to get some automatic Window Tiling features in Jwm.
Not as robust and pure tiling window managers, but at least we get some basic features.

[1] go to this site and get the latest downlod release. I chose the 64-bit version
https://github.com/blrsn/zentile

[2] copy the file over to /usr/bin
- optional I renamed it to zentile

[3] make the file executable. In my case

Code: Select all

 chmod +x /usr/bin/zentile

[4] add the binary to your startup apps:
In the menu in Setup -> Puppy Setup -> Startup
Choose: Manage Startup Apps -> Add to Startup
In the blank input box, type the name of the zentile binary executable, press the + icon, press ok

[5] Reboot Puppy.

Upon, reboot. Tiling is enabled by these shorcut keys: Ctrl + Shift + t
To turn off tiling, press: Ctrl + Shift + u

These are the basic features I use. There may be more advanced options that I have not discovered, so feel free to
add them if you find something useful. Also, if you find alternative apps, please let us know!

I did this in Vanilla Dpup 9.3 beta and confirms it works. Hopefully your pup has the above mentioned app to add it to startup. If not, you will have to find another way. To test it without adding to startup, just run the command in the terminal and activate tiling with Ctrl +Shift + t

Happy tiling!

EDIT: I modified this even further so that it is enabled automatically, but for this you need to have xdotool installed. This is an alternative to step 4 above.
Create the following script, make it executable and add it to the startup in place of the zentile binary. I had to add the sleep option to get it to work properly on my machine.
You may need to increase the sleep time on yours if it is slower than my computer.

Code: Select all

#!/bin/bash
/usr/bin/zentile &
sleep 5 && xdotool key ctrl+shift+t &
Attachments
zentile_desktop.png
zentile_desktop.png (286.09 KiB) Viewed 2414 times
Last edited by TurtleX on Mon Dec 05, 2022 1:02 pm, edited 4 times in total.
TurtleX
Posts: 24
Joined: Fri Dec 02, 2022 4:20 pm
Been thanked: 1 time

Re: How to get some Window Tiling features in Jwm

Post by TurtleX »

Here are the other shorcut keys using zentile, once you have activated it. Try it out!

Control-Shift-m
Control-Shift-s

Control-Shift-i
Control-Shift-d

Control-Shift-n
Control-Shift-p

Control-bracketright
Control-bracketleft

User avatar
spiritwild
Posts: 85
Joined: Wed Jul 22, 2020 1:34 am
Been thanked: 27 times

Re: How to get some Window Tiling features in Jwm

Post by spiritwild »

Thanks. It works on my Devuan 9 with JWM

TurtleX
Posts: 24
Joined: Fri Dec 02, 2022 4:20 pm
Been thanked: 1 time

Re: How to get some Window Tiling features in Jwm

Post by TurtleX »

spiritwild wrote: Sun Dec 04, 2022 6:20 pm

Thanks. It works on my Devuan 9 with JWM

You're welcome. I've never tried Devuan before. My favourite Debian spin at the moment is Spiral Debian. The xfce release is very clean and nice out of the box.
Devuan is Debian without systemd if I recall correctly. I use Artix, which is Arch without systemd. Lighter on resources than regular Arch.

geo_c
Posts: 2879
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2202 times
Been thanked: 876 times

Re: How to get some Window Tiling features in Jwm

Post by geo_c »

There is a good script here that I believe @MochiMoppel wrote and it works great in fossapup.

the stickyjwm pet is attached.

Attachments
stickyjwm-bb64.pet
(3.84 KiB) Downloaded 82 times

geo_c
Old School Hipster, and Such

TurtleX
Posts: 24
Joined: Fri Dec 02, 2022 4:20 pm
Been thanked: 1 time

Re: How to get some Window Tiling features in Jwm

Post by TurtleX »

geo_c wrote: Sun Dec 04, 2022 8:55 pm

There is a good script here that I believe @MochiMoppel wrote and it works great in fossapup.

It works! Thank you! Just a note that you need to install wmctrl before it will work. Fossapup already has wmctrl installed by default. Also it may override your existing keybindings, but you can alter the added file named /.jwm/stickjwm

Last edited by TurtleX on Mon Dec 05, 2022 12:59 pm, edited 1 time in total.
TurtleX
Posts: 24
Joined: Fri Dec 02, 2022 4:20 pm
Been thanked: 1 time

Re: How to get some Window Tiling features in Jwm

Post by TurtleX »

This thread was initially only used to get tiling working in jwm, but since I have pseudo-tiling options enabled in other window managers, I thought I'd add the info, here.
Please note that newer versions of jwm has 4 features that I would call pseudo-tiling. You can add these keybindings to your .jwmrc or /.jwm/jwmrc-personal file. I have used the numberpad keys as my default shortcuts. Note they work when numlock is turned off.

Code: Select all

<Key mask="4" key="KP_Left">maxleft</Key>
<Key mask="4" key="KP_Right">maxright</Key>
<Key mask="4" key="KP_Up">maxtop</Key>
<Key mask="4" key="KP_Down">maxbottom</Key>

Icewm has it's commands for keybindings. These shorcuts can be added to your home/.icewm/preferences file. In some distros, it may be in home/.config/icewm/preferences. Icewm will work with either folder.

Code: Select all

KeyWinTileLeft="Super+KP_Left"
KeyWinTileRight="Super+KP_Right"
KeyWinTileTop="Super+KP_Up"
KeyWinTileBottom="Super+KP_Down"

KeyWinTileTopLeft="Super+KP_Home"
KeyWinTileTopRight="Super+KP_Prior"
KeyWinTileBottomLeft="Super+KP_End"
KeyWinTileBottomRight="Super+KP_Next"

For openbox, you need to add the following to the home/.config/openbox/rc.xml - Be careful to make a backup of the original, and have an alternate window manager to boot into. Adding the tags improperly, could cause openbox not to run on next boot.
Note also that you need to add these in between the <keyboard> and </keyboard> tags

Code: Select all

    <!-- WINDOW KEYBINDINGS -->
    <keybind key="W-KP_1">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>0</x>
        <y>-0</y>
        <width>50%</width>
        <height>50%</height>
      </action>
    </keybind>
    <keybind key="W-KP_2">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>0</x>
        <y>-0</y>
        <width>100%</width>
        <height>50%</height>
      </action>
    </keybind>
    <keybind key="W-KP_3">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>-0</x>
        <y>-0</y>
        <width>50%</width>
        <height>50%</height>
      </action>
    </keybind>
    <keybind key="W-KP_4">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <width>50%</width>
        <height>100%</height>
      </action>
    </keybind>
    <keybind key="W-KP_5">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>center</x>
        <y>center</y>
        <width>50%</width>
        <height>50%</height>
      </action>
    </keybind>
    <keybind key="W-KP_6">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>-0</x>
        <y>0</y>
        <width>50%</width>
        <height>100%</height>
      </action>
    </keybind>
    <keybind key="W-KP_7">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <width>50%</width>
        <height>50%</height>
      </action>
    </keybind>
    <keybind key="W-KP_8">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <width>100%</width>
        <height>50%</height>
      </action>
    </keybind>
    <keybind key="W-KP_9">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>-0</x>
        <y>0</y>
        <width>50%</width>
        <height>50%</height>
      </action>
    </keybind>
    <keybind key="A-Escape">
      <action name="ShowMenu">
        <menu>client-menu</menu>
      </action>
    </keybind>
    <keybind key="W-Home">
      <action name="ToggleMaximize"/>
    </keybind>
    <keybind key="W-End">
      <action name="UnmaximizeFull"/>
    </keybind>
    <keybind key="W-S-Left">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>25%</width>
        <height>100%</height>
        <x>0%</x>
        <y>0%</y>
      </action>
    </keybind>
    <keybind key="W-Left">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <width>50%</width>
        <height>100%</height>
      </action>
    </keybind>
    <keybind key="W-Right">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>100%</height>
        <x>50%</x>
        <y>0%</y>
      </action>
    </keybind>
    <keybind key="W-S-Right">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>25%</width>
        <height>100%</height>
        <x>75%</x>
        <y>0%</y>
      </action>
    </keybind>
    <keybind key="W-Down">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>100%</width>
        <height>50%</height>
        <x>0%</x>
        <y>50%</y>
      </action>
    </keybind>
    <keybind key="W-S-Down">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>100%</width>
        <height>25%</height>
        <x>0%</x>
        <y>75%</y>
      </action>
    </keybind>
    <keybind key="W-Up">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>100%</width>
        <height>50%</height>
        <x>0%</x>
        <y>0%</y>
      </action>
    </keybind>
    <keybind key="W-S-Up">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>100%</width>
        <height>25%</height>
        <x>0%</x>
        <y>0%</y>
      </action>
    </keybind>
    <keybind key="W-Insert">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>50%</height>
        <x>0%</x>
        <y>0%</y>
      </action>
    </keybind>
    <keybind key="W-S-Insert">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>25%</width>
        <height>50%</height>
        <x>0%</x>
        <y>0%</y>
      </action>
    </keybind>
    <keybind key="W-Delete">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>50%</height>
        <x>0%</x>
        <y>50%</y>
      </action>
    </keybind>
    <keybind key="W-S-Delete">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>25%</width>
        <height>50%</height>
        <x>0%</x>
        <y>50%</y>
      </action>
    </keybind>
    <keybind key="W-Prior">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>50%</height>
        <x>50%</x>
        <y>0%</y>
      </action>
    </keybind>
    <keybind key="W-S-Prior">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>25%</width>
        <height>50%</height>
        <x>75%</x>
        <y>0%</y>
      </action>
    </keybind>
    <keybind key="W-Next">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>50%</height>
        <x>50%</x>
        <y>50%</y>
      </action>
    </keybind>
    <keybind key="W-S-Next">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>25%</width>
        <height>50%</height>
        <x>75%</x>
        <y>50%</y>
      </action>
    </keybind>
    <keybind key="W-KP_Divide">
      <action name="ResizeRelative">
        <right>-20</right>
      </action>
    </keybind>
    <keybind key="W-KP_Multiply">
      <action name="ResizeRelative">
        <right>20</right>
      </action>
    </keybind>
    <keybind key="W-KP_Subtract">
      <action name="ResizeRelative">
        <bottom>-20</bottom>
      </action>
    </keybind>
    <keybind key="W-KP_Add">
      <action name="ResizeRelative">
        <bottom>20</bottom>
      </action>
    </keybind>
    <keybind key="W-A-Right">
      <action name="UnmaximizeFull"/>
      <action name="GrowToEdgeEast"/>
    </keybind>
    <keybind key="W-A-Left">
      <action name="UnmaximizeFull"/>
      <action name="GrowToEdgeWest"/>
    </keybind>
    <keybind key="W-A-Down">
      <action name="UnmaximizeFull"/>
      <action name="GrowToEdgeSouth"/>
    </keybind>
    <keybind key="W-A-Up">
      <action name="UnmaximizeFull"/>
      <action name="GrowToEdgeNorth"/>
    </keybind>
    <keybind key="W-KP_0">
      <action name="ToggleMaximizeHorz"/>
    </keybind>
    <keybind key="W-KP_Enter">
      <action name="ToggleMaximizeVert"/>
    </keybind>
    <!-- END OF WINDOW KEYBINDINGS -->

In LXDE with openbox, you would added the same code, but the file is to edit is /home/.config/openbox/lxde-rc.xml

In xfce you do not need to edit any text file, so it is by far the easiest for new users. Just type "window" in the menu search and click on "Window Manager"
Click the "Keyboard" tab and you will find keybinding options for "Tile window to the top", "Tile window to the bottom" etc..

RubberDino
Posts: 1
Joined: Thu Dec 08, 2022 7:55 pm

Re: How to get some window tiling features in Jwm and other window managers

Post by RubberDino »

Rather than zentile I would suggest coretile https://github.com/leukipp/cortile, which is based on zentile.

Another pretty nice alternative XFCE tiling helper is xpytile https://github.com/jaywilkas/xpytile/.

TurtleX
Posts: 24
Joined: Fri Dec 02, 2022 4:20 pm
Been thanked: 1 time

Re: How to get some window tiling features in Jwm and other window managers

Post by TurtleX »

RubberDino wrote: Thu Dec 08, 2022 8:02 pm

Rather than zentile I would suggest, which is based on zentile.

Yeah, I took a look at it. I couldn't get it to install properly using golang, as per the instructions. The nice thing about zentile is that you can download the pre-compiled binary.

Post Reply

Return to “Utility”