1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+ <plist version =" 1.0" >
4+ <dict >
5+ <key >bundleid </key >
6+ <string >com.alfredapp.avivbens.noise-cancellation </string >
7+ <key >category </key >
8+ <string >Tools </string >
9+ <key >connections </key >
10+ <dict >
11+ <key >172F9A79-83D6-48B6-ADC5-BBA3E2F2D447 </key >
12+ <array >
13+ <dict >
14+ <key >destinationuid </key >
15+ <string >FDD54B33-1C83-4284-BB56-48B893CEFC88 </string >
16+ <key >modifiers </key >
17+ <integer >0 </integer >
18+ <key >modifiersubtext </key >
19+ <string ></string >
20+ <key >vitoclose </key >
21+ <false ></false >
22+ </dict >
23+ </array >
24+ </dict >
25+ <key >createdby </key >
26+ <string >Aviv Ben Shahar </string >
27+ <key >description </key >
28+ <string >Toggle noise cancellation on and off from Alfred </string >
29+ <key >disabled </key >
30+ <false ></false >
31+ <key >name </key >
32+ <string >Noise Cancellation </string >
33+ <key >objects </key >
34+ <array >
35+ <dict >
36+ <key >config </key >
37+ <dict >
38+ <key >argumenttype </key >
39+ <integer >2 </integer >
40+ <key >keyword </key >
41+ <string >nct </string >
42+ <key >subtext </key >
43+ <string ></string >
44+ <key >text </key >
45+ <string >Toggle Noise Cancellation </string >
46+ <key >withspace </key >
47+ <false ></false >
48+ </dict >
49+ <key >type </key >
50+ <string >alfred.workflow.input.keyword </string >
51+ <key >uid </key >
52+ <string >172F9A79-83D6-48B6-ADC5-BBA3E2F2D447 </string >
53+ <key >version </key >
54+ <integer >1 </integer >
55+ </dict >
56+ <dict >
57+ <key >config </key >
58+ <dict >
59+ <key >concurrently </key >
60+ <false ></false >
61+ <key >escaping </key >
62+ <integer >102 </integer >
63+ <key >script </key >
64+ <string >-- CONFIGURATION VARIABLES (User Settable) --
65+ set cc_localization_string to "Sound"
66+
67+ -- AirPods Listening Mode Checkboxes (counting only checkboxes)
68+ -- Checkbox 3 = Off, 4 = Transparency, 5 = Adaptive, 6 = Noise Cancellation
69+ set transparency_checkbox_index to 4
70+ set noise_cancellation_checkbox_index to 6
71+ ---------------------------------------------
72+
73+ tell application "System Events"
74+ tell application process "ControlCenter"
75+
76+ -- Open Sound Menu
77+ click (first UI element of menu bar 1 whose description starts with cc_localization_string)
78+ delay 0.3
79+
80+ -- Toggle Logic
81+ try
82+ set transparencyCheckbox to checkbox transparency_checkbox_index of scroll area 1 of group 1 of window 1
83+ set noiseCancellationCheckbox to checkbox noise_cancellation_checkbox_index of scroll area 1 of group 1 of window 1
84+
85+ if value of transparencyCheckbox is 1 then
86+ click noiseCancellationCheckbox
87+ else
88+ click transparencyCheckbox
89+ end if
90+
91+ on error errMsg number errNum
92+ display dialog "Error: " & errNum & ": " & errMsg
93+ end try
94+ delay 0.1
95+
96+ -- Close Control Center
97+ click (first UI element of menu bar 1 whose description starts with cc_localization_string)
98+ delay 0.01
99+
100+ end tell
101+ end tell </string >
102+ <key >scriptargtype </key >
103+ <integer >1 </integer >
104+ <key >scriptfile </key >
105+ <string ></string >
106+ <key >type </key >
107+ <integer >6 </integer >
108+ </dict >
109+ <key >type </key >
110+ <string >alfred.workflow.action.script </string >
111+ <key >uid </key >
112+ <string >FDD54B33-1C83-4284-BB56-48B893CEFC88 </string >
113+ <key >version </key >
114+ <integer >2 </integer >
115+ </dict >
116+ </array >
117+ <key >readme </key >
118+ <string >#### Thank you for using Noise Cancellation! ✨
119+
120+ ## Features
121+
122+ Toggle noise cancellation on and off directly from Alfred.
123+ Currently, MacOS 26 does not provide a public API for noise cancellation, so this workflow uses private APIs with AppleScripts. Use at your own risk!
124+
125+ ## Usage
126+
127+ Use the keyword `nct` to toggle noise cancellation on or off.
128+
129+ To view the workflow codebase, click here:
130+ https://github.com/Avivbens/alfredo </string >
131+ <key >uidata </key >
132+ <dict >
133+ <key >172F9A79-83D6-48B6-ADC5-BBA3E2F2D447 </key >
134+ <dict >
135+ <key >xpos </key >
136+ <integer >140 </integer >
137+ <key >ypos </key >
138+ <integer >185 </integer >
139+ </dict >
140+ <key >FDD54B33-1C83-4284-BB56-48B893CEFC88 </key >
141+ <dict >
142+ <key >xpos </key >
143+ <integer >475 </integer >
144+ <key >ypos </key >
145+ <integer >185 </integer >
146+ </dict >
147+ </dict >
148+ <key >userconfigurationconfig </key >
149+ <array ></array >
150+ <key >webaddress </key >
151+ <string >https://github.com/Avivbens/alfredo </string >
152+ <key >version </key >
153+ <string >1.0.0 </string >
154+ </dict >
155+ </plist >
0 commit comments