Simple Window Manager - SWM

probably no need to do so unless you activate the preload option! I'll probably be the only one running into this :slight_smile:

lol i remember now and it began to make sense i tried to solve BTT uses high CPU on idle i guess its around 1 year ago. now i understand source of problem but can not remember how did i fixed back in the day. i guess i will add caution to first post to warn users to do not enable that

I checked this thread and am not sure what I am missing. When using the MBP with no or one external monitor, the right-click on the minimize button works as expected. Below is my setup when the MBP is docked. The right-click works on the two external displays, but nothing happens when the app window is on the MBP screen. Fn-W does work on the MBP Screen to bring up the actions view. I have restarted BTT, but I still have the same issue. What am I missing?

MBP (Lid open) - display (primary) - display

Sonoma 14.5
BTT 4.576
SWM 1.0.3

EDIT: My external displays are the Studio Displays at the default resolution, and the right-click does work when I reduce the resolution on the monitors to Large Text, but stops working when I switch it back to the default.

@Appolusionist i have tried different scalings on my mac but couldnt replicate your issue. maybe it can be related with negative coordinates for monitor. can you send result of this applescript

use AppleScript version "2.4" -- Yosemite (10.10) or later
use framework "Foundation"
use framework "AppKit"
use scripting additions

set allFrames to (current application's NSScreen's screens()'s valueForKey:"frame") as list

this script will list all monitors and positions. also a screenshot of macOS settings > display > arrange would be nice

Fn+W & Fn+S still working on that monitor while right click on yellow button not working. right?

Yes, Fn+W and Fn+S work on that screen, but the right-click on the yellow button does not work. Here are the results of the AppleScript and a screenshot of my monitor arrangement.

{{{0.0, 0.0}, {2560.0, 1440.0}}, {{-1728.0, 323.0}, {1728.0, 1117.0}}, {{2560.0, 1440.0}, {1440.0, 2560.0}}}

None of videos load here. Can you put it on YouTube ?

@Appolusionist is left one is not working on arrangement?

@sunnysigara they work without problem on my mac. can you test with another browser maybe your plugin/extensions blocking it

Yes, the left one

@Appolusionist
Automations & Other Triggers > SWM - Triggers > Yellow (Minimize) button trigger > Run Real javascript > Can you replace with code at below and hit compile button

(async()=>{
	n=(await get_string_variable("hovered_element_details")).split('<AXApplication: "')[1].split('"')[0]
	trigger_named('swmfloat')
	set_persistent_string_variable({variable_name:'SWM-FA',to:(n=="")?"":(n+":"+((await get_number_variable("fullscreen_active"))==1))})
	returnToBTT(1)
})()

I just want to make sure its related with applescript part. if its not its related with "hovered_element_details"

Same issue on the left screen after compiling the new code.

@Appolusionist can you try this one and please share result of script. it will show a dialog when you trigger with SWM with yellow button

(async()=>{
	h=await get_string_variable("hovered_element_details")
	n=h.split('<AXApplication: "')[1].split('"')[0]
	p=h.split('AXPosition:  "')[1].split('"')[0]
	trigger_named('swmfloat')
	set_persistent_string_variable({variable_name:'SWM-FA',to:(n=="")?"":(n+":"+((await get_number_variable("fullscreen_active"))==1))})
	runAppleScript(`
		tell app "System Events" to tell process "BetterTouchTool"
			tell window 1 whose subrole is "AXSystemDialog" to try
				set {x,y} to position
				set position to {x+50,y+60}
			end try
			set frontmost to true
		end tell
	`)
	mx = await get_number_variable('mouse_position_x')
	my = await get_number_variable('mouse_position_y')
	alert(n + " - " + p  + " - " + mx + " , " + my)
	returnToBTT(1)
})()

try this if you dont see any dialogs.
• click on any advanced conditions button
• hovered UI element viewer
• move your cursor to minimize button while target window on that monitor
• use shift + space to freeze hovered UI element viewer
• share result

The screen recording of the TextEdit and Hovered UI Element Inspector is on my left screen. When my cursor is over the minimize button, the Element Inspector does not recognize that I am over it. Still, when I move the TextEdit window to my middle screen, the Inspector does recognize that I am over the minimize button indicated by the AXRoleDescription.

@Andreas_Hegenberg can you check this issue? confused a bit. Dont know its macOS bug or BTT bug. window not in "window list" on not register itself as window while monitor has negative numbers for positioning. Maybe hovering UI element inspector completely ignores monitors with negative positioning

It looks like there might be some invisible overlay that prevents UI element inspector from accessing it. Negative positioning should not be a problem.

Can you think of any third party app that overlays the screen at that position? Or do you maybe have floating webviews / menus in BTT that could for some reason still stick around invisibly?