Skip to content

Add Microphone Input Level applet#8257

Open
Skatterbrainz wants to merge 2 commits intolinuxmint:masterfrom
Skatterbrainz:master
Open

Add Microphone Input Level applet#8257
Skatterbrainz wants to merge 2 commits intolinuxmint:masterfrom
Skatterbrainz:master

Conversation

@Skatterbrainz
Copy link

A Cinnamon panel applet for controlling microphone input volume and mute status.

Features:

  • Real-time volume display on panel
  • Volume slider (0-100%)
  • Mute/unmute toggle
  • Dynamic icon that changes based on volume level and mute status
  • Uses PulseAudio (pactl) for audio control
  • Updates automatically every second

Tested on Cinnamon 6.6.6 with Linux Mint 22.3

Skatterbrainz and others added 2 commits January 30, 2026 13:50
A Cinnamon panel applet for controlling microphone input volume and mute status.

Features:
- Real-time volume display on panel
- Volume slider (0-100%)
- Mute/unmute toggle
- Dynamic icon based on level
- PulseAudio integration

Co-Authored-By: Warp <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Best-practices scanner

This is a regex-based check for API usage that can pose security, performance or
maintainability issues, or that may already be provided by Cinnamon. Having code flagged
by it doesn't automatically disqualify a pull request.

This check is not perfect will not replace a normal review.


Found 12 potential issue(s):

⚠️ sync_spawn_command_line

mic-input/files/mic-input/applet.js:56

let [result, stdout, stderr] = GLib.spawn_command_line_sync('pactl get-default-source');

Synchronous process spawning blocks the main loop.
Use GLib.spawn_command_line_async() or Gio.Subprocess instead.

mic-input/files/mic-input/applet.js:68

let [result, stdout, stderr] = GLib.spawn_command_line_sync('pactl get-source-volume ' + source);

Synchronous process spawning blocks the main loop.
Use GLib.spawn_command_line_async() or Gio.Subprocess instead.

mic-input/files/mic-input/applet.js:84

let [result, stdout, stderr] = GLib.spawn_command_line_sync('pactl get-source-mute ' + source);

Synchronous process spawning blocks the main loop.
Use GLib.spawn_command_line_async() or Gio.Subprocess instead.

⚠️ lang_bind

mic-input/files/mic-input/applet.js:28

this._timeoutId = Mainloop.timeout_add_seconds(1, Lang.bind(this, this._updateVolume));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

mic-input/files/mic-input/applet.js:33

this.muteSwitch.connect('toggled', Lang.bind(this, this._onMuteToggled));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

mic-input/files/mic-input/applet.js:42

this.volumeSlider.connect('value-changed', Lang.bind(this, this._onVolumeChanged));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

ℹ️ shell_string_spawn

mic-input/files/mic-input/applet.js:49

Util.spawnCommandLine("cinnamon-settings sound");

Prefer argument vector spawn functions over shell command strings.
This is especially important when arguments include untrusted input (user data,
filenames, settings values, etc.) as shell strings are vulnerable to injection.
Static command strings are generally fine, but argv is always safer.
Use Util.spawn(["cmd", "arg1", "arg2"]) or Util.trySpawn() instead.

mic-input/files/mic-input/applet.js:56

let [result, stdout, stderr] = GLib.spawn_command_line_sync('pactl get-default-source');

Prefer argument vector spawn functions over shell command strings.
This is especially important when arguments include untrusted input (user data,
filenames, settings values, etc.) as shell strings are vulnerable to injection.
Static command strings are generally fine, but argv is always safer.
Use Util.spawn(["cmd", "arg1", "arg2"]) or Util.trySpawn() instead.

mic-input/files/mic-input/applet.js:68

let [result, stdout, stderr] = GLib.spawn_command_line_sync('pactl get-source-volume ' + source);

Prefer argument vector spawn functions over shell command strings.
This is especially important when arguments include untrusted input (user data,
filenames, settings values, etc.) as shell strings are vulnerable to injection.
Static command strings are generally fine, but argv is always safer.
Use Util.spawn(["cmd", "arg1", "arg2"]) or Util.trySpawn() instead.

mic-input/files/mic-input/applet.js:84

let [result, stdout, stderr] = GLib.spawn_command_line_sync('pactl get-source-mute ' + source);

Prefer argument vector spawn functions over shell command strings.
This is especially important when arguments include untrusted input (user data,
filenames, settings values, etc.) as shell strings are vulnerable to injection.
Static command strings are generally fine, but argv is always safer.
Use Util.spawn(["cmd", "arg1", "arg2"]) or Util.trySpawn() instead.

mic-input/files/mic-input/applet.js:128

Util.spawnCommandLine("pactl set-source-volume " + source + " " + volume + "%");

Prefer argument vector spawn functions over shell command strings.
This is especially important when arguments include untrusted input (user data,
filenames, settings values, etc.) as shell strings are vulnerable to injection.
Static command strings are generally fine, but argv is always safer.
Use Util.spawn(["cmd", "arg1", "arg2"]) or Util.trySpawn() instead.

mic-input/files/mic-input/applet.js:139

Util.spawnCommandLine("pactl set-source-mute " + source + " " + muteValue);

Prefer argument vector spawn functions over shell command strings.
This is especially important when arguments include untrusted input (user data,
filenames, settings values, etc.) as shell strings are vulnerable to injection.
Static command strings are generally fine, but argv is always safer.
Use Util.spawn(["cmd", "arg1", "arg2"]) or Util.trySpawn() instead.


Automated pattern check.

@Skatterbrainz
Copy link
Author

I'm not sure I submitted this PR correctly, my first time doing this. Hopefully someone will let me know if I need to make any corrections. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant