Skip to content

Instantly share code, notes, and snippets.

@n-st
Created April 27, 2020 18:18
Show Gist options
  • Select an option

  • Save n-st/1eed75eaa2d53fd8430f98a228390925 to your computer and use it in GitHub Desktop.

Select an option

Save n-st/1eed75eaa2d53fd8430f98a228390925 to your computer and use it in GitHub Desktop.

Revisions

  1. n-st created this gist Apr 27, 2020.
    6 changes: 6 additions & 0 deletions microphone-toggle
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #!/bin/sh

    notify-send \
    --expire-time=700 \
    "$(pacmd list-sources | awk 'BEGIN { FPAT = "[^ \t]+|\"[^\"]+\"" } $1 == "*" { find=1 } $1 == "device.description" { if (find) { print substr($NF,2,length($NF)-2); exit; } }')" \
    "$(amixer set Capture toggle | grep -oP '(?<=\[)o[nf]+(?=\])' | sort -u)"
    5 changes: 5 additions & 0 deletions xbindkeysrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    "microphone-toggle"
    shift + XF86AudioMute

    "microphone-toggle"
    XF86AudioMicMute