Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve blacklist UX #539

Closed
alt-tab-macos-bot opened this issue Aug 17, 2020 · 11 comments
Closed

Improve blacklist UX #539

alt-tab-macos-bot opened this issue Aug 17, 2020 · 11 comments
Labels
enhancement New feature or request

Comments

@alt-tab-macos-bot
Copy link

This issue was opened by a bot after a user submitted feedback through the in-app form.

From: [email protected]

Message:

Firstly, thanks for creating this and making it open-source. I have been a long time user of Contexts and Alt-Tab is simply the best app switcher for mac.

Can you please update the guide on your website on how to blacklist apps since everyone might not be aware that they have to enter bundle IDs?

Or modifying the blacklisting to allow simple app names.

@lwouis lwouis changed the title [In-app feedback] Improve blacklist UX Aug 18, 2020
@lwouis
Copy link
Owner

lwouis commented Aug 18, 2020

Thanks for sharing this feedback!

Indeed the blacklist UX is quite poor. I was very aware of it while implementing it. I did it the way it is to get the feature out of the door and give functionality to the users asking for it. Ideally the UI would be better at managing items in the list.

Some apps show a list of active apps to pick from. Some others show a list of apps such as what launchpad would show. Both have limitations though

PRs very welcome for this ticket! Please discuss your plans for the UI before submitting a PR though 👍

@lwouis lwouis added the enhancement New feature or request label Aug 20, 2020
@lwouis
Copy link
Owner

lwouis commented Aug 24, 2020

See for instance, #549 in which I had to allow blacklisting the beginning of a bundleID instead of a the full ID, so that tricky apps like Parallels can be blacklisted. How would a UI look like that also handles this scenario?

Maybe a selector UI first, then after the UI picks the app, it would add the bundle ID instead of a nice App Name + Icon?

@lwouis
Copy link
Owner

lwouis commented Aug 24, 2020

Another lesson from #386 is that if we have a UI to list apps, it will need to show all apps AltTab is observing, not just apps in the Dock.

@SoPat712
Copy link

SoPat712 commented Sep 6, 2020

Is there any other identifier for windows in mac other than bundleID?

@lwouis
Copy link
Owner

lwouis commented Sep 6, 2020

A bundleIdentifier identifies an app bundle (i.e. a .app). It doesn't identify windows. Windows have a CGWindowID.

  • Regarding bundleIdentifier. It identifiers uniquely an app bundle. Some apps are not package as a bundle. Like a binary, a daemon, the Android Simulator, etc. This creates an issue on how to identify such apps. What I've done in the past is identify them based on the path of their executable, or based on the argument they were started with.
  • Regarding CGWindowId. These are allocated at window creation time, and they uniquely identify a window only while it exists. When the window is destroyed, the ID is free'd and can be assigned to another window. Re-opening the "same" window gives it a new ID. This blocking windows based on their ID would not work.

@lwouis
Copy link
Owner

lwouis commented Sep 9, 2020

Interesting to note how Contexts does this UI, with a combination of an app picker and a title matching regex. Note that the app picker lists currently running apps, not all installed apps. Also note that it's showing processes not having a Dock icon.

image

image

@lwouis
Copy link
Owner

lwouis commented Oct 20, 2020

In order to also incorporate the scope of #648, I think the future UI should combine both current blacklists into 1 that looks like the screenshot above (i.e. using NSTableView) that looks like this:

App Don't show this app Ignore shortcuts when this app is active
Localized name [Don't show anything / Only show open windows ] [Always / Only if active window is fullscreen]

Alternatively, we could replace Only show open windows with Only show windows with this pattern as shown on the screenshot above. It would allow more fine-tuning, but since no-one asked for this level of granularity, I think we can simplify with the 2 options I listed.

@lwouis
Copy link
Owner

lwouis commented Apr 12, 2021

A potential half-way solution / quick-win: #858

@lwouis
Copy link
Owner

lwouis commented Apr 29, 2022

Writing this so I can refer it for people who need to blacklist an app before this ticket is implemented:

  • Open Terminal.app
  • Type this command: mdls -name kMDItemCFBundleIdentifier /Application/Bothersome.app (replace the end with the path to the app you want to blacklist)
  • Press enter
  • Copy-paste the result in AltTab's blacklist window

This was referenced May 6, 2022
This was referenced May 29, 2022
@lwouis
Copy link
Owner

lwouis commented Jun 10, 2022

Specs to implement this ticket:

  • Replace the 2 NSTextViews with 2 NSTableViews
  • Each would have a + and - button to add/remove items
    • Clicking + would bring a native file picker UI, which can only pick applications
    • Adding an app would list it in the list with its icon and name
    • Adding an app multiple times would not do anything
    • Adding an app which has no bundleIdentifier (e.g. Android Simulator) would do nothing
  • For the first table, add an extra column where each row will have a dropdown:
    • Hide all windows
    • Hide open windows
    • Hide when no open window
  • Tables have no headers
  • Tables scroll when they overflow with items
  • If names are truncated, mouse hover to reveal

Regarding implementing the list UI, here are some good StackOverflow threads:

@lwouis
Copy link
Owner

lwouis commented Jun 10, 2022

Actually, we can't have name and icon because it can vary over time and setup.

The only thing we can preset is the bundleIds.

We could scan the /Applications folder and look for the preset bundleIds and add name and icon to those we find. But people can have apps in other folders. Also the apps they don't have wouldn't be updated like that.

@lwouis lwouis closed this as completed in 07f29d3 Jun 13, 2022
lwouis added a commit that referenced this issue Jun 14, 2022
lwouis pushed a commit that referenced this issue Jun 14, 2022
# [6.43.0](v6.42.0...v6.43.0) (2022-06-14)

### Features

* improve blacklist ux (closes [#539](#539)) ([892a168](892a168))
* improve german and chinese (tw) localizations ([5133641](5133641))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants