diff options
| author | Blake Romero <blake@blkrom.com> | 2024-11-02 12:39:51 +0000 |
|---|---|---|
| committer | Blake Romero <blake@blkrom.com> | 2024-11-02 21:39:20 +0000 |
| commit | 1c75d4226470dbf4cea85fdbaf42679bd11d736f (patch) | |
| tree | 3d4ba6ea4ec48a0c3127007d7c4bebd78964919f | |
Add volume script
| -rwxr-xr-x | volume | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -0,0 +1,32 @@ +#!/bin/sh +# +# VOLUME +# + +id="@DEFAULT_AUDIO_SINK@" + +if [ "$#" -eq 0 ]; then + wpctl get-volume "$id" | awk '{print$2}' + exit +fi + +case "$1" in + "toggle") + wpctl set-mute "$id" toggle + ;; + "up") + wpctl set-mute "$id" 0 + wpctl set-volume --limit 1.0 "$id" 5%+ + ;; + "down") + wpctl set-mute "$id" 0 + wpctl set-volume "$id" 5%- + ;; + "reset") + wpctl set-volume "$id" 50% + ;; + "set") + wpctl set-volume "$id" "$2" + ;; +esac + |
