Simple Window Manager - SWM

hi i will share new version after few weeks with nice additions, i added 4x2 grid

im drawing icons on illustrator

here is a preview of new UI

Screen Shot 2022-11-20 at 23.42.44

this ui creates room for more functions, you have to scroll to end on previous version. you can simply click to navigate for prefered grid on this one
i added navigation buttons for common, 3x2,2x3 3x3 and 4x2, will add more options for sure

rectangle on bottom right for window alignments


Have you thought about using CSS to dynamically create the grid? I have some code that might work. Do you mind if I tweak your code and share something with you if I can get it to work?

  • dynamic image using CSS
  • custom dynamic sizer option where user can input some data, like what size grid and what x,y they want the app to be and the script does the math


CustomGrid copy

here is a concept drawing of dynamic grid, i used table for ui instead of x,y boxes for easier usage
basic usage and features
user can store 3 different grid
first click on grid starts selection, second click on grid resizes window
clicking outside of grid cancels grid selection

coding table is easy but finding neighbor cells a bit harder, it should highlight cells on mouse hover

1 Like

Wow. This is kinda awesome. What do you mean finding neighbor cells? Is your code on GitHub? I can try to help?


l  1  l  2  l  3  l  4  l 
l  5  l  6  l  7  l  8  l 
l  9  l  10 l  11 l  12 l

drawing a rectangle from 2 to 12, you will click/select 2 first then move your mouse to 12
script should highlight 3-4-6-7-8-10-12 dynamically when cursor on 12
when your mouse on 7 it highlights 3-6-7

script should create x/y cordinate and x/y size as percentages, for example drawing a rectangle 2 to 7 gives 25,0,50,66, 6 to 12 gives 25,33,75,66

i will share new version this week, you can work on this, also it should be easier if you create javascript separately, i can integrate to swm.

here i worked table on a bit


I took some liberties.

  • The table ratio is set to match the monitor ratio (line 67)
  • I changed the style to show different cursor
  • A few other changes that you'll see

Could you make a gap between snapped windows configurable?

Updated first post with 0.7 release
you can download from my gumroad page
SWM be free always but any supports are appreciated, you can download with putting 0 to box

Change log

  • New - reworked ui
  • New - align window to corners
  • Changed - reordered 2x3 and 3x2 actions
  • Improvement - added dev mode on settings for easier troubleshoot
  • Fixed - swm functions not working on full screen windows

Preview for next version

@kbecker what you mean "snapped" windows, do you want gap setting for all window resize functions, why you want that? its possible but didnt get point

@imthenachoman here is final version
i removed ratio because it will broke ui
thanks for help

Nice! Can't wait to try this out.

I was looking for an option similar to the one BTT uses when using window snapping:

@kbecker SWM uses screen percentage instead of pixels, this would be problem but i will look what i can do

Updated first post with 0.8 release and new features
you can download from gumroad page

Change log

  • New - Custom resize grid
  • New - Open preset folder with P keyboard shortcut
  • New - Added setting for start with grid view
  • New - Toggle view between Predefined Functions and Custom Grid with G keyboard shortcut
  • Fixed - Restore / Maximize Button not working
  • Fixed - Wrong amount scroll on Predefined Functions while using mouse scroll
  • Changed - Moved general window functions to right side

@yw4z Hey man, just curious as to how to go about removing the double click title bar to maximize/restore option? IF that was something we wanted to do. I couldn't figure which part of the settings to tamper with, I did try removing from line 1042 to about 1049 I believe (even though that's just for the management window and has no bearing on the double click) but it didn't prove fruitful anyway haha

Or maybe it was somewhere around line 497, I don't recall right now but yeah.

Nonetheless, much appreciated in advance homie :heart:

@deeznugs you can disable double click to title bar function from
BTT > Automations & Named & Other Triggers > :traffic_light: SWM Titlebar Double Click > Right click then select Enable/Disable Selected Trigger
But you got a point, i will add this as option to settings in swm.html

1 Like

loving the new update,
is it possible (would like to suggest if possible) to have a favorite or specific window pinned as a way to easier restore a window size

@Duval_Barrett if i understand correct, you want restoring to restore window to given size, instead of previous / stored size. ex. center of screen with window size %50 of screen

yes exactly
add an empty space (or window) that can be customized to a specific size window of your choice if that makes sense

@Duval_Barrett i will share next release with gap feature soon, will add this feature on following release

thanks alot, no rush at all appreciate your work

Thought this app's UI might be interesting:

It's able to show a grid over the screen, user draws a window shape to resize app windows. (Like some word processor's UI to select number of rows and columns for tables.)

1 Like