mirror of
https://github.com/elenapan/dotfiles.git
synced 2026-01-11 17:18:02 +08:00
Former-commit-id: 4295c806ec
Former-commit-id: c87f8e56cd2677dbb5a2a15e90f879a9fa1a1a6b
Former-commit-id: 1ad787023efcecb57853b9a5103dff461192e56d
Former-commit-id: 595bf6d1621414a7b6e7d8e9acb374ce52687596
22 lines
665 B
Bash
Executable file
22 lines
665 B
Bash
Executable file
#!/bin/bash
|
|
# Control volume
|
|
# Requires pulseaudio
|
|
# --------------------------
|
|
|
|
# Steps for raising/lowering volume
|
|
STEP=5
|
|
BIG_STEP=25
|
|
|
|
if [[ "$1" = "up" ]]; then
|
|
pactl set-sink-mute 0 0 && pactl set-sink-volume @DEFAULT_SINK@ +$STEP%
|
|
elif [[ "$1" = "UP" ]]; then
|
|
pactl set-sink-mute 0 0 && pactl set-sink-volume @DEFAULT_SINK@ +$BIG_STEP%
|
|
elif [[ "$1" = "down" ]]; then
|
|
pactl set-sink-mute 0 0 && pactl set-sink-volume @DEFAULT_SINK@ -$STEP%
|
|
elif [[ "$1" = "DOWN" ]]; then
|
|
pactl set-sink-mute 0 0 && pactl set-sink-volume @DEFAULT_SINK@ -$BIG_STEP%
|
|
elif [[ "$1" = "toggle" ]]; then
|
|
pactl set-sink-mute 0 toggle
|
|
else
|
|
echo "No argument."
|
|
fi
|