I've got this idea to create a more powerful slidepad-like feature implementation via BTT.
The main structure is this:
1. As shown above, the first step is dragging an app to a floating menu. The ideal solution is dragging it to the left/right edge, but I don't know how to trigger it. Unfortunately, the thread did not mention how to detect apps.
2. when mouse is at left/right edge for a moment without being held down, the pad would slide out quickly and smoothly. And like slidepad, if the mouse is clicked somewhere else, the slidepad slides back smoothly.
Well, they would slide out when mouse is at left/right edge for a certain amount of time. It’s just cool and convenient if I can use an app and hide it at any moment.
ah so you want to slide in/out an actual app window?
Unfortunately that will not be possible currently and in general is very hard to achieve and would require a lot of trickery - if it even can be done in an acceptable way.
It's not exactly the same, but moving the mouse to an edge of the screen can be a trigger. This could then be used to show or hide an app or window, no?
Yes, that can be done. (If you want to specify custom area positions you can also place a floating menu at the edges and make them trigger the show/hide specific app actions on hover). However I think this is not exactly what @ND-Zyth wants
function run() {
var app = Application("System Events");
var slidepad = Application("Slidepad");
// Activate the application
slidepad.activate();
delay(0.3);
// Get screen dimensions
var screen = app.desktop().bounds();
var screenWidth = screen[2];
var screenHeight = screen[3];
// Animate the window (using gradual positioning)
var window = app.processes.byName("Slidepad").windows[0];
var targetWidth = 400;
// Initial position (off-screen left)
window.position = [-targetWidth, 0];
window.size = [targetWidth, screenHeight];
// Animate in
for (var i = 1; i <= 10; i++) {
window.position = [-targetWidth + (i * targetWidth / 10), 0];
delay(0.01);
}
// Final position
window.position = [0, 0];
}
The main challenge is, well, the drag-n-drop part.
Looks ChatGPT generated without having tried it? Unfortunately this won't work. (What I mean - even if this is only supposed to be a sketch - there are tons of edge cases you need to handle and with multiple displays connected this will often fail in funny ways - and what is position 0,0 supposed to be?)
Here is an example menu that allows you to drop a window in case you want to experiment with it: drop-window.bttpreset (15.2 KB)
To make this work reliably in any way, you'd probably need to implement something like this:
Capture a screenshot of the window
Hide the original window
Place the screenshot in a new window under your control (you can only control other app's windows in very limited ways)