stiler - Add Tiling Support to JWM (Fossapup64)

Moderator: Forum moderators

Post Reply
Burunduk
Posts: 255
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 7 times
Been thanked: 127 times

stiler - Add Tiling Support to JWM (Fossapup64)

Post by Burunduk »

stiler on github

Found it in the Arch wiki where it's called "Poor man's tiling window manager". It uses wmctrl to rearrange windows. This is an old python2 script and fossapup only has python3. Knowing next to nothing about coding I've used a tool to convert it. Still needed to read some answers on stackoverflow to make it run. I've changed it a bit at the same time. Here are the changes:

  • converted to python3 (by 2to3 and some tweaking)

  • applied the proposed fix for the maximized windows bug (from github)

  • replaced xdotool with xwininfo as the latter is already installed

  • added a config option to ignore minimized windows

  • added a config option for the default layout that is used by swap and cycle issued before simple, vertical or horizontal commands

  • swap and cycle now works with vertical and horizontal layouts too

Tested on Fossapup64-9.5 only.

Usage:

  • download and gunzip to /root/my-applications/bin (make executable)

  • create JWM keyboard shortcuts for action exec:stiler.py command where command can be: left right simple vertical horizontal swap cycle maximize max_all (one command at a time)

Notes:

  • left and right are supported by JWM itself (maxleft and other actions)

  • Just found this fork Requires python2 too, uses xprop and has more functions.

Attachments
stiler.gif
stiler.gif (97.07 KiB) Viewed 1090 times
stiler.py.gz
stiler script (gunzip it)
(2.82 KiB) Downloaded 75 times
User avatar
rockedge
Site Admin
Posts: 6551
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2757 times
Been thanked: 2628 times
Contact:

Re: stiler - Add Tiling Support to JWM (Fossapup64)

Post by rockedge »

Wow! very cool....I am playing around with stickyjwm and this that you've worked on looks good as well. I am going to try it out and I may modify your work to see if I can run it on KLV.

Burunduk
Posts: 255
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 7 times
Been thanked: 127 times

Re: stiler - Add Tiling Support to JWM (Fossapup64)

Post by Burunduk »

It's Stiler 3.0.2 now (3 stands for Python3)

It's a pet package. It adds keyboard shortcuts and a right-click menu to the "show desktop" button.

Changes:

  • The config option to ignore minimized windows replaced with MaxCountX and MaxCountY options. All the windows (from the active desktop) are involved in tiling but not at the same time. Stiler now takes into account the program specified minimal window size. The biggest minimal value is used for all windows even when the one that has it is minimized.

  • cycle (and the added cycle_back) now doesn't touch the first window.

  • NxN command where N can be 1,2,..,9 to choose the layout. Note that this is limited by the options above, the minimal size and number of windows.

Configuration files:

  • /root/.stilerrc - delete it if you have one from the previous version. WinTitle and WinBorder values should match those from the jwm configuration (e.g. if <WindowStyle><Height>30</Height><Width>3</Width></WindowStyle> then WinTitle=30 and WinBorder=3 )

  • /root/.jwm/jwm-stiler - edit the right-click menu and the hotkeys here. mask="A4" means left Alt and left WinKey together.

Notes:

  • Only tested on Fossapup64-9.5

  • wmctrl misplaces dillo windows

  • wide windows on the right side of simple layout may not fit the desktop

  • dialog windows are skipped by stiler but it works better without them.

Attachments
Screenshot.png
Screenshot.png (16.35 KiB) Viewed 1024 times
stiler-3.0.2.pet
for Fossapup64 only
(4.03 KiB) Downloaded 83 times
Post Reply

Return to “Desktop”