-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60896d1
commit a6f7078
Showing
5 changed files
with
45 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
MODE=$1 # on/off | ||
|
||
APPS=( | ||
"telegram-desktop" | ||
"whatsapp-for-linux" | ||
) | ||
|
||
if [ "$MODE" == "on" ]; then | ||
MODE="mute" | ||
dunstctl set-paused true 2>/dev/null | ||
else | ||
MODE="unmute" | ||
dunstctl set-paused false 2>/dev/null | ||
fi | ||
|
||
for APP in "${APPS[@]}"; do | ||
$HOME/bin/toggle-app-audio $APP $MODE | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
APP_NAME=$1 | ||
ACTION=$2 | ||
SINK_INPUTS=$(pactl list sink-inputs | grep -i -E -B 20 "(application.name = \"$APP_NAME\"|device.description = \"$APP_NAME\")" | grep "Sink Input #" | awk '{print $3}' | sed 's/#//g') | ||
|
||
for SINK in $SINK_INPUTS; do | ||
MUTE_STATUS=0 | ||
if [ "$ACTION" == "mute" ]; then | ||
MUTE_STATUS=1 | ||
fi | ||
|
||
pactl set-sink-input-mute $SINK $MUTE_STATUS | ||
done |