fix: correct WezTerm process name for macOS focus detection#64
Merged
mohak34 merged 1 commit intoApr 12, 2026
Merged
Conversation
On macOS, System Events reports the CFBundleExecutable value as the process name. For WezTerm this is 'wezterm-gui', not 'WezTerm' or 'wezterm' (those are the CFBundleName / TERM_PROGRAM values). This mismatch caused isMacTerminalAppFocused() to always return false for WezTerm users, so suppressWhenFocused had no effect. Fix by mapping TERM_PROGRAM=WezTerm -> 'wezterm-gui' in getExpectedMacTerminalAppNames(), and updating MAC_TERMINAL_APP_NAMES to use 'wezterm-gui' for the fallback case. Affects all macOS WezTerm installs regardless of install method, as the binary name is defined in the app bundle's Info.plist. Closes mohak34#63
f4aae9c to
b631a02
Compare
Owner
|
This should be fixed in 0.2.2. If you have any issues let me know. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes
suppressWhenFocusedhaving no effect for WezTerm users on macOS.Closes #63
Problem
On macOS,
System Eventsreports theCFBundleExecutablevalue as the process name. For WezTerm that value iswezterm-gui(defined in the app bundle'sInfo.plist), notWezTermorwezterm.The focus detection compared the frontmost app name against the expected terminal name derived from
TERM_PROGRAM=WezTerm, which normalized to"wezterm". Since"wezterm-gui" !== "wezterm",isMacTerminalAppFocused()always returnedfalseand notifications were never suppressed.This affects all macOS WezTerm users regardless of install method (Homebrew cask, direct download, nightly) since the binary name is defined in the
.appbundle itself.Fix
TERM_PROGRAM=weztermingetExpectedMacTerminalAppNames()that adds"wezterm-gui"instead of falling through to the generic branch which adds"wezterm"MAC_TERMINAL_APP_NAMES(used as fallback whenTERM_PROGRAMis unset) to use"wezterm-gui"for the same reasonVerification