diff options
| author | 2026-05-14 10:58:37 +0100 | |
|---|---|---|
| committer | 2026-05-14 10:58:37 +0100 | |
| commit | 726005786ab398e89673bf8c141e50645f676c57 (patch) | |
| tree | c6157391bfb7b41e4db1309b78b17f680f0c50c3 /dot_config/sway/executable_vol-osd.sh | |
| parent | db4c6bdcd2af6aa2b95f587974f34c0246f62cb8 (diff) | |
| download | dotfiles-726005786ab398e89673bf8c141e50645f676c57.tar.gz dotfiles-726005786ab398e89673bf8c141e50645f676c57.tar.bz2 dotfiles-726005786ab398e89673bf8c141e50645f676c57.zip | |
style: apply shfmt/prettier/just fmt drift
Pure formatter output from shfmt (2-space indent, '|' line breaks),
prettier (KEYBINDS.md), and 'just fmt' (justfile blank line).
No behavior change.
Diffstat (limited to 'dot_config/sway/executable_vol-osd.sh')
| -rw-r--r-- | dot_config/sway/executable_vol-osd.sh | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/dot_config/sway/executable_vol-osd.sh b/dot_config/sway/executable_vol-osd.sh index 46f35b7..7e324e0 100644 --- a/dot_config/sway/executable_vol-osd.sh +++ b/dot_config/sway/executable_vol-osd.sh @@ -7,17 +7,20 @@ fifo=${XDG_RUNTIME_DIR:-/tmp}/wob.sock sink='@DEFAULT_SINK@' case "${1:-}" in - up) pactl set-sink-volume "$sink" +5% ;; - down) pactl set-sink-volume "$sink" -5% ;; - mute) pactl set-sink-mute "$sink" toggle ;; - *) echo "usage: $0 up|down|mute" >&2; exit 2 ;; + up) pactl set-sink-volume "$sink" +5% ;; + down) pactl set-sink-volume "$sink" -5% ;; + mute) pactl set-sink-mute "$sink" toggle ;; + *) + echo "usage: $0 up|down|mute" >&2 + exit 2 + ;; esac muted=$(pactl get-sink-mute "$sink" | awk '{print $2}') if [ "$muted" = "yes" ]; then - printf '0\n' >"$fifo" + printf '0\n' >"$fifo" else - pactl get-sink-volume "$sink" | - awk '/Volume:/ { for (i=1;i<=NF;i++) if ($i ~ /%/) { gsub(/%/,"",$i); print $i; exit } }' \ - >"$fifo" + pactl get-sink-volume "$sink" | + awk '/Volume:/ { for (i=1;i<=NF;i++) if ($i ~ /%/) { gsub(/%/,"",$i); print $i; exit } }' \ + >"$fifo" fi |
