Jump to content

Automation Task > Window Management Issue


Recommended Posts

So playing around with some of the new additions in Alfred 5, and I came across the Automation Task..

 

So the Left Half, moves the window to the left, and resizes it from top to bottom. However the Left Third only moves the window to the top left corner, but does not extend the window to the bottom of the screen..

 

915916459_ScreenShot2022-07-11at8_15_57AM.thumb.png.7b639e6517a5b79cd7c5543fd3022ecf.png

 

Is this a bug or expected behavior? Its the same for Right Third, and Centre Third.. the window is not resized from top to bottom, just moved.

 

In any other window snapping app I've used, the options for "Thirds" always extended the window from top to bottom.. I currently use BTT for window snapping/moving. But I have that configured to use the trackpad gestures to move windows around.. I'd like something in Alfred via keyboard, for when I'm to lazy to reach for the trackpad. But I really need that Left & Right Third option. As I have a really large monitor (34" Ultrawide 5k) and use windows positioned to the left and right (thirds) with my main focus window in the on either the Left or Right Two Thirds. Like this...
(This is using BTT Left Third & Right Two Third window management feature)
1927980596_ScreenShot2022-07-11at8_27_12AM.thumb.png.afd0a4ec37a64ee30c2502b822baa5f1.png

Link to comment
Share on other sites

1 hour ago, Smpl said:

the window is not resized from top to bottom, just moved.

 

It is being resized vertically, to one third of the screen’s height. But that’s not the intended behaviour, indeed it should be the full height. Update the Automation Tasks to 2022.3 and it should be fixed.

Link to comment
Share on other sites

1 hour ago, vitor said:

 

It is being resized vertically, to one third of the screen’s height. But that’s not the intended behaviour, indeed it should be the full height. Update the Automation Tasks to 2022.3 and it should be fixed.

 

Thanks for the quick fix. Working as I would have expected it too now :) 

 

Currently the Automation Task > Window Management seems to only target the "topmost" app. Do you know if there is any plans to allow us to target specific apps, or let the Window Position/Resize accept an input?

 

Would be nice to be able to target apps sitting in the background, tucked behind other apps, to quickly bring those to the front.

Or maybe an Automation Task that sets an App to the foremost/topmost, and accepts Input, so that we can bring those windows in hiding to the front to interact with them.

 

Really it would be much better if the "Expected Input" and "Output" had selectable option..
So for example, on the "Is App Running?" task, it just outputs true or false. Would be better if we could set the output the same App Name/Bundle ID it was given if true instead of the current "From Task"..

 

Additional Suggestion:

  • A "Close Apps" task would be nice to have.
    • Sometime just want to close the foremost window of an app, like Safari, but not quit the app entirely
  • The "Open Apps" doesn't seem to target an app that is Minimized to the dock.
    • If I close all windows, it will open a new window (tested on mail, finder, slack)
    • If I quit the app, it will open it (tested on mail, finder, slack)
    • If app is "Hidden" (right click app in dock, select Hide) it will bring the window back.
    • If app is minimized, it will not open the minimized window.
  • Task that lists all Open/Running Apps
  • Use words more consistently;
    • Some task use "foremost" (macOS folder) while others use "topmost" (Window Management folder) - assuming this is the same thing
    • You can tell some of the words are written by someone outside the US/Canada area
      • maximise < minimize
      • centre < center
Link to comment
Share on other sites

1 hour ago, Smpl said:

Or maybe an Automation Task that sets an App to the foremost/topmost

 

Launch Apps & Files Action.

 

1 hour ago, Smpl said:

So for example, on the "Is App Running?" task, it just outputs true or false.

 

Yes, that’s by design. The point is to use it in conjunction with Conditional objects.

 

1 hour ago, Smpl said:

Would be better if we could set the output the same App Name/Bundle ID it was given if true instead of the current "From Task"

 

If you want the name of bundle ID of the frontmost app, use the Identify Frontmost App Automation Task. Or save it in an Argument and Variables Utility beforehand. You already know the information because you had to pass it in to Is App Running?

 

1 hour ago, Smpl said:

A "Close Apps" task would be nice to have.

 

There are two to quit apps in the macOS group. From the subpoint I’m guess you meant “close windows”. That’s on my list but I still have to think of edge cases.

 

1 hour ago, Smpl said:

The "Open Apps" doesn't seem to target an app that is Minimized to the dock.

 

Looks to be a quirk of JXA. It and AppleScript invoke apps differently. Will release the fix in the next version.

 

5 hours ago, Smpl said:

Task that lists all Open/Running Apps

 

On my list to consider.

 

5 hours ago, Smpl said:

Some task use "foremost" (macOS folder) while others use "topmost" (Window Management folder) - assuming this is the same thing

 

The frontmost window or tab of an application may not be the topmost window on your screen (may not even be visible).

 

5 hours ago, Smpl said:

You can tell some of the words are written by someone outside the US/Canada area

 

It’s intentional, that’s UK English.

Link to comment
Share on other sites

11 hours ago, vitor said:
18 hours ago, Smpl said:

A "Close Apps" task would be nice to have.

 

There are two to quit apps in the macOS group. From the subpoint I’m guess you meant “close windows”. That’s on my list but I still have to think of edge cases.

 


There are multiple use cases for this; Having multiple windows of an app open, like Safari, Finder, TextEdit, VBC, etc.. Not wanting to Quit the app entirely, but just close the current active Window, or close the window with the matching title. Example, in Finder, I hate using Tabs, so I usually have 2-3 Finder Windows (Downloads, Screenshots, Documents) open.. Same with Safari..

 

Or if Slack is open, I don't want to "Quit" the app (which exit it entirely), as then I wouldn't get notifications, but I might want to Close it.
Same for Mail; Want to close the main Window, but might have a Compose Window open as well. Using Quit App would close everything.. Also it would stop retrieving new mail if its "quit."

 

Anyways, those 2 "Quit Apps" options in the MacOS group, quits all windows (the app) of the given input...

Granted could just do the 'close/close window' with an AppleScript block, but thought it would be nice just to have it as a quick Automation Task. 

 

As for “close windows” - that is what same apps refers to it as (note there is no "Close Window" option in the Safari Automation Task group).. but some apps just refer to it as "Close" like Mail, TextEdit, and many others.. 

 

12 hours ago, vitor said:
18 hours ago, Smpl said:

Some task use "foremost" (macOS folder) while others use "topmost" (Window Management folder) - assuming this is the same thing

 

The frontmost window or tab of an application may not be the topmost window on your screen (may not even be visible).

 

I'm not seeing how that would be possible; Totally confused by that.. The "Set Window Bounds" (and other) don't accept input, so you can't target the "topmost" of an app.. They target whatever window is currently active (last clicked on).. the foremost. "Topmost is a synonym for foremost. In some cases you can use "Topmost" instead an adjective "Foremost"."

 

12 hours ago, vitor said:
18 hours ago, Smpl said:

Or maybe an Automation Task that sets an App to the foremost/topmost

 

Launch Apps & Files Action.

 

This does not seem to accept an input (argument).. it only functions on the apps/files you add to the list manually. Unless I'm missing something.. As I'm passing it an argument, and it does not "Toggle" the the given app.

Link to comment
Share on other sites

1 minute ago, Smpl said:

There are multiple use cases for this

 

I wrote edge cases, not “use cases”.

 

2 minutes ago, Smpl said:

foremost

 

The first time you wrote that I thought it was a typo or autocorrect. There isn’t a single instance of “foremost” in the Automation Tasks. It’s written frontmost. “Topmost” is being used globally (all windows) while “frontmost” is being used locally (relative to the app).

 

If you have one Mail window showing and two Safari windows behind that, the Mail window is the topmost on your screen. Of the two Safari windows, one will be the frontmost (the one most recently active) but not the topmost. A topmost window is always frontmost; the opposite isn’t true.

 

10 minutes ago, Smpl said:

This does not seem to accept an input (argument)

 

You can also use the Open Apps Automation Task. They will be brought to the front unless you specifically tell them not to.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...