mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 16:51:34 +02:00
⚡ Add scripts & configs
This commit is contained in:
parent
f8ffdbda2e
commit
734af357dd
33 changed files with 1432 additions and 957 deletions
21
config/polybar/scripts/microphone.sh
Executable file
21
config/polybar/scripts/microphone.sh
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
MICSYMBOL=$1
|
||||
MICMUTEDSYMBOL=$2
|
||||
|
||||
case "$1" in
|
||||
--click)
|
||||
amixer -D pulse sset Capture toggle
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
STATUS=$(amixer -D pulse get Capture | grep -E "\[on\]|\[off\]" | cut -s -d ' ' -f 8 | uniq)
|
||||
|
||||
if [[ $STATUS = "[on]" ]]; then
|
||||
echo $MICSYMBOL
|
||||
elif [[ $STATUS = "[off]" ]]; then
|
||||
echo $MICMUTEDSYMBOL
|
||||
else
|
||||
echo "Not working, check script."
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue