Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions extensions/defaultmic/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules


# Raycast specific files
raycast-env.d.ts
.raycast-swift-build
.swiftpm
compiled_raycast_swift
compiled_raycast_rust

# misc
.DS_Store
/.idea
4 changes: 4 additions & 0 deletions extensions/defaultmic/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"printWidth": 120,
"singleQuote": false
}
11 changes: 11 additions & 0 deletions extensions/defaultmic/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# DefaultMic Changelog

## [Initial Version] - {PR_MERGE_DATE}

- Added `Select Default Mic` command to list input devices and set the active system microphone.
- Added `Toggle Mic Lock` command to enable or disable persistent microphone locking.
- Added preferred microphone persistence via Raycast LocalStorage.
- Added automatic sync of lock target when a new preferred microphone is selected.
- Added background lock agent setup via LaunchAgent to keep the selected microphone active.
- Added automatic installation of `switchaudio-osx` via Homebrew when `SwitchAudioSource` is missing.
- Added clearer dependency error messages when Homebrew is unavailable or install fails.
16 changes: 16 additions & 0 deletions extensions/defaultmic/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# DefaultMic

Raycast extension for macOS with 2 commands:

- `Select Default Mic` - choose and set the default microphone from a list.
- `Toggle Mic Lock` - turn lock on/off. When lock is ON, the extension keeps restoring the selected microphone even after connecting other audio devices.

## Dependency handling

The extension needs `SwitchAudioSource` and checks it every time commands are opened.

If the binary is missing, the extension automatically installs `switchaudio-osx` via Homebrew.

You can also run installation manually from the action panel using `Install SwitchAudioSource`.

If Homebrew is missing or installation fails, the extension shows a clear error message with the next step.
Binary file added extensions/defaultmic/assets/extension-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions extensions/defaultmic/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const { defineConfig } = require("eslint/config");
const raycastConfig = require("@raycast/eslint-config");

module.exports = defineConfig([
...raycastConfig,
]);
Binary file added extensions/defaultmic/metadata/defaultmic-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added extensions/defaultmic/metadata/defaultmic-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading