diff options
| author | coasteen <coasteen@proton.me> | 2026-07-09 10:42:28 +0330 |
|---|---|---|
| committer | coasteen <coasteen@proton.me> | 2026-07-09 10:42:28 +0330 |
| commit | 8cbadb61604667b407b53ee1258433994fa4765a (patch) | |
| tree | 97765fb29418fd6278fcb4cbb9760893afaf7a58 /local/bin/sb-volume | |
Diffstat (limited to 'local/bin/sb-volume')
| -rwxr-xr-x | local/bin/sb-volume | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/local/bin/sb-volume b/local/bin/sb-volume new file mode 100755 index 0000000..0736259 --- /dev/null +++ b/local/bin/sb-volume @@ -0,0 +1,14 @@ +#!/bin/sh + +_bsd() { + sndioctl -n output.level | sed 's/0\.//' | sed 's/.$/%/' | sed 's/\.//' +} + +_linux() { + printf "$(pamixer --get-volume)%%\n" +} + +case $(uname) in + Linux) _linux ;; + *BSD) _bsd ;; +esac |
