Simple Window Manager - SWM

This will make you super annoyed and frustrated as I feel when someone tells me I missed something like this so I apologise in advance but...

Halves.

Awesome work though! looks very stock which is not easy to do!

@yuuiko

thanks yuuiko, its great to hear, you are right about halves. a simple typo mistake for a simple app :slight_smile:

1 Like

I love SWM! Thank you for the hard work you've put into it. Unfortunately some of the presets crash BTT pretty reliably. I'm on Catalina with an external monitor. Split Left/Right is a culprit. I'm not sure how to be helpful in debugging, but please let me know if I can be :slight_smile:

hi @planetz

thanks for reporting can you run this applescript;

tell application "BetterTouchTool" to trigger_action "{"BTTPredefinedActionType":163}"

this tells btt to split window to left (164 for right). i used predefined actions of btt in swm mostly if applescript not working pls let me know,

do u have any problems with other functions of swm and which actions crashing btt

Thanks for your work on this @yw4z. SWM is very useful.

I am having a problem getting the switcher function to work. No error message but nothing happens when I click it or use the keyboard shortcut.

Did I perhaps change a setting that interferes with this?

Thanks.

@Danny_Sands hello danny, which version of macos do you have

SWM uses this script for window switcher

do shell script "/Applications/Mission\ Control.app/Contents/MacOS/Mission\ Control 2"

lets try with btt predefined actions, can you change this lines in html file

async function WindowSwitcher(){
async function ApplicationExpose(){runSS(/Applications/Mission\\ Control.app/Contents/MacOS/Mission\\ Control 2)}
async function MissionControl(){runAS(tell application "Mission Control" to launch)}
if (fss.innerHTML == "false"){ApplicationExpose()}
else {MissionControl()}
await bWeb('c')
}

to

async function WindowSwitcher(){
if (fss.innerHTML == "false"){bWeb('p',6,1)}
else {bWeb('p',5,1)}
}

pls let me know result

Hi. Yes that fixed it!

FYI I am on Mac OS 10.15.5.

Thanks so much!

Updated first post with 0.4 release

Changelog

  • New - Redesigned UI for more modern look with translucent background
    Screen-Shot-2020-07-14-at-15.53.07
  • New - Redesigned tooltip with shortcut description. You can hide from bottom of html file
    Screen Shot 2020-07-14 at 16.08.53
  • Fixed - Typo "Halfs" changed to "Halves". Thanks to @yuuiko
  • Fixed - Window switcher not working properly on catalina
  • Updated future plans
1 Like

Thank you very much for this excellent script. Could you please change it to the same as MOOM, where options appear after hovering, instead of having to right-click on them? Thank you very much!

@leon thanks for feedback but its not possible atm with bettertouchtool,
alternatively you can use keyboard shortcut fn + W.

@Andreas_Hegenberg i guess adding this feature would be nice. hover on window buttons as triggers

I have installed this preset, but the resizing and reposition of windows does not work.
The tests have been made in the Finder.
As far as I can tell all permissions is set correctly in Catalinas security preferences.

@jimmyhartington

Hi Jimmy

Can you check this settings

Be sure Bettertouchtool window not active otherwise BTT window will try to steal focus then SWM will fail

Settings > Security & Privacy > Privacy > Accessibility > Check Bettertouchtool and script editor in here

Settings > Security & Privacy > Privacy > Automation > Check finder and other apps you prefer below Bettertouchtool

Bettertouchtool > Settings > Scripting BTT > Check "Allow External Bettertouchtool Scripting"

Try keyboard shortcuts instead of clicking yellow button, press fn+W then press Option+Right

If none these work, open a script editor with small windows size, paste this script and press run, this script should move window to right.

tell application "Finder" to set {dpx, dpy, dx, dy} to get bounds of window of desktop
tell application "System Events" to tell first window of application process (name of the first process whose frontmost is true)
	set {sx, sy} to size
	set {px, py} to position
	set position to {(dx - sx), py}
end tell

please let me know result

Hi

All the settings are set correct.
Using the fn+W then press Option+Right moves the window to the next screen.
Just pressing right does nothing.
So it seems like the resizing is not happening.

Running the script does move the window.

moving issues look like related with external monitor setup, i guess have work more on script with more test
do you open SWM with fn+W before using resize shortcuts, im still on mojave so i cant test these scripts on catalina. but im planing to jump big sur after .2 release

I opened SWM with fn+W.
But it surely also could be a Catalina issue.

I am on Catalina 10.15.7.
I downloaded Simple-Window-Manager-v0_4.bttpresetzip, double clicked on it to imported it. Then I enabled this preset in BTT.
However, when I clicked on Fn+W, it only shows a spinning wheel and do nothing.
And there is nothing in the preset folder.

I've enabled "Allow external BetterTouchTool scripting".
Anything else missing?

preset folder empty spinning wheel

@cartern that folder should contain preset files, does your user name contains chinese characters?, maybe its a bug related with that, also you can try manually adding contents to folder, change bttpresetzip extension to zip then extract it, here is proper content list of folder

you need SWM.html one and png images in there

wow! It works by changing the file to .zip and extract it.
And I have the same issue with your MCC preset which is solved this way!
BTW, my Mac username doesn't contain Chinese chars.
Many thanks.

Those 2 presets are so beautiful! :+1:

1 Like

Hi. Love your SWM preset--really impressive piece of work.

One thing that does not work right is when choosing a window position when the app has multiple windows open. What should happen is that the current window should be repositioned, but that is never what happens--it repositions the bottom-most window of the app, which is frustrating.

I also have a suggestion, which would be to provide option for upper and lower thirds. These would be very useful for Zoom calls, so one can position the video window near the webcam and still see my screen.

Thanks.

Danny Sands

Did you maybe change the window snapping settings in the BTT preferences?

This should be set to "Focused Window"