Simple Window Manager - SWM

You're a fucking lovely human being you know that? Haha, appreciate it, I'm so stupid shoulda known to find it in Named triggers :see_no_evil:.

Thing is even with it disabled, it still shows this message anytime you double click a window to zoom (default behavior for MacOS)

@deeznugs looks like its a bug on BTT, you can delete trigger if not planning to use for now
similar discussion in community

@Andreas_Hegenberg disabling double click titlebar trigger with context menu > Enable/Disable Selected Trigger still shows a alert about doubleclick feature. look posts above. added a setting to SWM for it but disabling not enough

@vurt it has cool ui. saving window positions also cool. maybe i can create a similar feature based on most used workspaces instead of selected window.
showing grid on background appeared in my mind after adding custom grid feature. sometimes i was surprised because selected grid looks not same with end result due to different ratio of screen and custom grid. i'm planing to add this feature but i have to make a big change on code for this.
also swm has advantage with predefined actions compared to this

2 Likes

I'll have a look!

Finally got my mac working again. Installed the new version and absolutely love it. Thank you so much!

This is probably a silly question with an obvious answer that I'm just missing so forgive me because I'm new here. Where am I able to review the Apple Scripts prior to installing? Is there a Github repo link I'm missing somewhere?

Obviously with the system permissions BTT requires it would be utterly stupid to just blindly install a zip like this, so I'm guessing I'm just not seeing a link or button somewhere on here..

But I did look reasonably hard before asking for what that's worth haha

Looks like a fantastic preset by the way and I can't wait to use it!

@imthenachoman glad you like it, thanks for support and your help on custom grid, i will release a new version soon with a lot of new features

i was planned to release last week but found few bugs and so tested more, popup view is still exist this ui is addition. here is a preview

@anon
you can download preset file from gumroad for free
just put 0 for price and you can use a dummy email

If you want to review a BTT preset file before installation
you can change .bttpresetzip extension to .zip to extract
SWM uses only 3 applescripts as file most of scripts in html file

1 Like

Beautiful - that is so helpful to know! That trick worked wonderfully and I am now using your preset. Thank you!

1 Like

I have both a Windows and macOS machine for work. For the last few years I've been bouncing between the two but I mostly stick to Windows.

Now, because of SWM, and some Karabiner key swaps, I'm sticking to just macOS. I absolutely love SWM.

I had an idea/question. Right now you have hard-coded the pre-defined actions and have associated images.

I'm wondering, what if you let the user create their own pre-defined actions and used CSS to dynamically create the associated image.

So, imagine in the SWM config there is string like:

pre_defined=4x4:2,2,2,2;6x2:1,1,3,2;5x5:1,1,3,3

And then the tool would dynamically create those and use HTML/CSS/JS to create the associated "images".

In my example, each predefined action follows this formula:

CxR:x,y,w,h:

  • C = number of columns
  • R = number of rows
  • x = row number for where the window should start
  • y = column number for where window should start
  • w = width of window represented as number of cells
  • h = height of window represented as number of cells

I'm happy to mock something together if you think this would be a good idea?

Is it just me?
For some reason I can't get the download on the gumroad link to work.
Also, it says 0.7 version on the download button.

Please advise

Duh.
After clicking the desired amount, you have to manually enter the amount to enable the "Buy" button!

1 Like

@imthenachoman yep u actually describe workspaces feature, im working its design for a while

my plan for SWM
0.9 > fullscreen ui with many improvements ( i will try to release tomorrow, i hope :slight_smile: )
1.0 > add custom grid for fullscreen ui & some under hood work
1.1 > workspaces, this one is a bit challenging

here is my design template for workspaces, users can draw and save their predefined window layouts

also i have to make ui bigger for easier usage

1 Like

Workspace looks incredible.

I keep thinking of an app or a functionality like what you're doing with workspaces, but with the ability to cmd+tab through these different workspace set up for different tasks. Instead of cmd+tab to switch apps or windows.

Similar to the idea of Spaces or Stage Manager to group apps for tasks, but these Workspaces exist on one desktop in stacked layers that I can cmd+tab.

Right now I'm using Contexts to switch apps and it has a function to manually organize apps into groups. In theory I should be able to cmd+tab through groups of apps.

Sidenote: Is there a way to capture a log to troubleshoot? I disabled SWM for now because I think sometimes when I right-click my mouse, it seems to trigger SWMM or something else in BTT that resizes my window. I have no idea how to troubleshoot it except it hasn't appeared since I disabled SWM.

u can try to use often builtin spaces feature for that, it works nicely. you can switch between spaces with ctrl+1, ctrl+2...
also you can use this triggers on BTT
Screen Shot 2023-02-26 at 02.44.33
Ctrl + Tab > Next space
Ctrl + Shift + Tab > Previous space
You can move windows to next/previous space with SWM easily with keyboard shortcuts. Shift + Left / Rİght

SWM not generates a log atm only you can use console log but it only shows critical errors
BTT only opens SWM when you right click minimize button. additionally you can check your all triggers related with right click. Let me know if see similar bug on next version

1 Like

Yeah I've tried Spaces, just not a fan of it visually—the whole animation of moving between Spaces.

But that's a nice tip to use ctrl+tab!

I don't know what's going on re. the right-click trigger because I don't use BTT for the mouse. I've been using Steermouse for 10+ years I think. :: Before BTT became the swiss army knife it is now—I use BTT for trackpad gestures and keyboard shortcuts for window resize/snap.

I'll definitely give new SWM a spin, I'd been waiting for a new version and hoping the odd right-click issue magically goes away!

1 Like

@yw4z

The workspace feature is nice, but that's not what I was talking about.

Right now, the pre-defined actions are for left half, right half, top half, bottom half, top left, ... left third ... etc.

But not everyone uses/needs all of those pre-defined actions. So, my idea was to give users a way to create their own pre-defined actions.

Also, have you considered developing this for Windows? I've been working on something using AutoHotKey. I'd love to talk to you about it. Can I email you?

@imthenachoman

Currently swm buttons has this template

<a		onclick='o([0,66,66,34])'
		t='3x3 Bottom Left Two'
><img	src=3X3BLT.png
/></a>

i can use this as template for custom icons

<!--   <pg> will create a navigation dot--> 
<pg     t='Tooltip for customized page for predefined actions' >
<c> <!--   <c> is container for rows, it supports justify-content:space-between--> 
<a		custom='0,66,66,34'     t='Tooltip text for custom icon'  ></a>
<a		custom='0,66,66,34'     t='Tooltip text for custom icon'  ></a>
<a		custom='0,66,66,34'     t='Tooltip text for custom icon'  ></a>
</c>
</pg>

i can generate icons with custom variable but icons will be pixelated or gets wrong anti aliasing on end result. But i understand your point, you want to add your own actions without dealing with icon designs.
i will try to implement this feature

i sent a pm to you, about windows stuff

@vurt yep mac animations is really slowing down my work. im using windows daily for my work setup. there is no animations on windows and feels snappier. i will release 0.9 version today. started to editing first post

1 Like

Updated first post with 0.9 release
Check first post for detailed information, videos and guides about new features

This one is most leap forward release yet. Most of code changed in this release.
Please let me know your experience

Some features might require BTT alpha releases , update to alpha if you have any problems first

Changelog

Full Screen Overlay

First implementation of Fullscreen Overlay features. Added this one to see how much of its possible with BTT. I'm planning to merge popup view and fullscreen overlay on future releases.

  • Halves, Quarters, Vertical and Horizontal Thirds window sizes supported. i will add custom grid on next version.
  • Start Fullscreen Overlay with Fn + S on any screen
  • Switch grid with pressing SPACE key, 3 Finger Tap, Middle Click or use Context Menu. Also you can switch grid with 3 finger tap or middle click
  • All other keyboard shortcuts works on fullscreen overlay same as popup view

Continuous Mode on Full Screen Overlay

  • Toggle Continuous Mode with C+CMD
  • White dashed border shows Continuous Mode mode is active on full screen overlay
  • You can move window with arrow keys in Continuous Mode. Moving uses Distance value

Edge Gap

  • Edge Gap, leave space between resized windows
  • Keyboard shortcuts for Edge Gap Size. CMD+0 increase / CMD+9 Decrease. Min value: 10px Max Value: 50px
  • Toggle Edge Gap feature with G keyboard shortcut
  • Tooltip area shows Edge Gap value while toggling

Gestures

  • Trackpad / Mouse gestures for windows

  • Maximize / Restore Window
     Fn + Swipe/Scroll Up Over window

  • Minimize Window (Works on Mission Control & App Expose)
     Fn + Swipe/Scroll Down Over window

  • Close Window on Mission Control / App Expose (not works on minimized windows)
     4 Finger TipTap Left / Middle Click + Fn

Double Click to Titlebar

  • Maximize / Restore action rewritten as javascript. works faster now
  • Setting for double click on title bar to start Fullscreen overlay
  • Added a setting for disable / enable double click on titlebar to maximize / restore window size trigger

New Features

  • Resize window to max width with CMD+Shift+Right keyboard shortcut
  • Resize window to max height with CMD+Shift+Left keyboard shortcut
  • Added a setting for disabling animation of preview box for window size. I will connect this setting to other animated elements on future releases
  • Added setting "MaxWindowGap" for enabling Edge Gap on maximized windows. also works on Maximize / Restore action if edge gap enabled
  • Keyboard shortcuts for "Distance" setting. 0 increase / 9 Decrease. Min value: 10px Max Value: 100px. Distance is used for Incremental Resize(Bigger/narrower..) and Move window actions

Changes

  • Make window bigger keyboard shortcut to CMD+Shift+Up instead of Shift+Up
  • Make window smaller keyboard shortcut to CMD+Shift+Down instead of Shift+Down
  • Resize function term changed to Incremental Resize to avoid confusion
  • Resize Factor term changed to Distance to avoid confusion
  • Toggle view uses SPACE key instead of G key on popup view
  • Settings have a separate file in preset folder that named Prefs.js

Improvement

  • Added a tooltip for indicating reached max number or rows / columns on custom grid
  • Reworked handling of fullscreen windows
  • Reworked Tile Window to Left / Right scripts
  • Improved code for keyboard shortcut events
  • Changed pre launch scripts to javascript. Loading popup ui while switching between keyboard trigger to minimize button a bit faster
  • Edge Gap, Gap Size & Distance settings is dynamic you can change them from UI. No need to edit setting file for them
  • SWM shows an alert if target application has no window
  • Designed an icon for SWM, it shows up only in alerts for now
  • SWM now keeps dynamic settings between new version installs
  • SWM unminimizes first window of frontmost application if its minimized. let me know if its confusing

Fixes

  • Incremental Resize actions on fullscreen windows works without error now
  • Custom grid leaves gap between windows
  • Double click to title bar triggering if you're closing multiple windows in a short time of same app

Known Issues

  • SWM cant launch properly after changing some settings. it will work normal on second launch

Updated Future Plan

[⭑⭑⭑] Custom grid for fullscreen overlay
[⭑⭑⭑] Merge Popup view and Fullscreen overlay to 1 file. This one also will allow switching between them and Continuous Mode on popup view
[⭑⭑⭑] Previewing window size on background while hovering resize buttons for popup view
[⭑⭑⭐︎] Workspaces view for main & fullscreen overlay. Will allow user to set a window layout with custom grid and save 7 of them
[⭑⭑⭐︎] Add setting for fullscreen overlay to choose which view to show on launch
[⭑⭑⭐︎] Add support for new "Pin/Unpin focused window to float on top" action
[⭑⭑⭐︎] Use icons for grid layouts on fullscreen overlay context menu and popups
[⭑⭑⭐︎] Setting for custom restore size / position for double click to titlebar
[⭑⭐︎⭐︎] Dark / Light mode setting for fullscreen overlay
[⭑⭐︎⭐︎] UI for Incremental Resize(Taller,Shorter...)

Download

1 Like

Anyway to have it remember which pre-defined layout page you're on? For example, if I go to the 3rd page (3x3 layouts), then next time I open SWM it should go back to the 3x3 layouts view.

I'm really excited to try this - looks like an amazing amount of work! And it's so cool that BTT is becoming a platform for other app developers to also release powerful tools.

I just bought SWM on Gumroad, and I may be being dumb, but I can't find version 0.9? I did Download All -> As Zip, and in the Zip I see versions 0.8 to 0.2.4, and also a version 1.0. But I also see that all dates are 4th Feb, where the latest release should be late Feb?

And Gumroad seems to indicate that the latest version is 0.8?

EDIT: figured it out in post below