Skip to content

Instantly share code, notes, and snippets.

@Zren
Last active April 5, 2021 01:49
Show Gist options
  • Save Zren/cb3cf8370458af53f44c8c33e4be5939 to your computer and use it in GitHub Desktop.
Save Zren/cb3cf8370458af53f44c8c33e4be5939 to your computer and use it in GitHub Desktop.
function pa_defaultsink_name () { pacmd stat | awk -F": " '/^Default sink name: /{print $2}'; };
function pa_defaultsink_getvolume () { pacmd list-sinks | grep -A10 "$(pa_defaultsink_name)" | grep "volume: front-left:" | sed 's/\tvolume: front-left: // ; s/,\s*front-right:.*//'; };
function pa_defaultsink_setvolume () { pactl set-sink-volume "$(pa_defaultsink_name)" "$1"; pa_defaultsink_getvolume; };
for i in $(seq 0 150); do pa_defaultsink_setvolume "${i}%"; sleep 1; done > ~/Desktop/PAVolumeSteps.txt
0 / 0% / -inf dB
655 / 1% / -120.01 dB
1310 / 2% / -101.95 dB
1966 / 3% / -91.37 dB
2621 / 4% / -83.88 dB
3276 / 5% / -78.07 dB
3932 / 6% / -73.31 dB
4587 / 7% / -69.30 dB
5242 / 8% / -65.82 dB
5898 / 9% / -62.75 dB
6553 / 10% / -60.00 dB
7208 / 11% / -57.52 dB
7864 / 12% / -55.25 dB
8519 / 13% / -53.17 dB
9175 / 14% / -51.23 dB
9830 / 15% / -49.44 dB
10485 / 16% / -47.75 dB
11141 / 17% / -46.17 dB
11796 / 18% / -44.68 dB
12451 / 19% / -43.28 dB
13107 / 20% / -41.94 dB
13762 / 21% / -40.67 dB
14417 / 22% / -39.46 dB
15073 / 23% / -38.30 dB
15728 / 24% / -37.19 dB
16384 / 25% / -36.12 dB
17039 / 26% / -35.10 dB
17694 / 27% / -34.12 dB
18350 / 28% / -33.17 dB
19005 / 29% / -32.26 dB
19660 / 30% / -31.37 dB
20316 / 31% / -30.52 dB
20971 / 32% / -29.69 dB
21626 / 33% / -28.89 dB
22282 / 34% / -28.11 dB
22937 / 35% / -27.36 dB
23592 / 36% / -26.62 dB
24248 / 37% / -25.91 dB
24903 / 38% / -25.21 dB
25559 / 39% / -24.54 dB
26214 / 40% / -23.88 dB
26869 / 41% / -23.23 dB
27525 / 42% / -22.61 dB
28180 / 43% / -21.99 dB
28835 / 44% / -21.39 dB
29491 / 45% / -20.81 dB
30146 / 46% / -20.24 dB
30801 / 47% / -19.67 dB
31457 / 48% / -19.13 dB
32112 / 49% / -18.59 dB
32768 / 50% / -18.06 dB
33423 / 51% / -17.55 dB
34078 / 52% / -17.04 dB
34734 / 53% / -16.54 dB
35389 / 54% / -16.06 dB
36044 / 55% / -15.58 dB
36700 / 56% / -15.11 dB
37355 / 57% / -14.65 dB
38010 / 58% / -14.19 dB
38666 / 59% / -13.75 dB
39321 / 60% / -13.31 dB
39976 / 61% / -12.88 dB
40632 / 62% / -12.46 dB
41287 / 63% / -12.04 dB
41943 / 64% / -11.63 dB
42598 / 65% / -11.23 dB
43253 / 66% / -10.83 dB
43909 / 67% / -10.44 dB
44564 / 68% / -10.05 dB
45219 / 69% / -9.67 dB
45875 / 70% / -9.29 dB
46530 / 71% / -8.92 dB
47185 / 72% / -8.56 dB
47841 / 73% / -8.20 dB
48496 / 74% / -7.85 dB
49152 / 75% / -7.50 dB
49807 / 76% / -7.15 dB
50462 / 77% / -6.81 dB
51118 / 78% / -6.47 dB
51773 / 79% / -6.14 dB
52428 / 80% / -5.81 dB
53084 / 81% / -5.49 dB
53739 / 82% / -5.17 dB
54394 / 83% / -4.86 dB
55050 / 84% / -4.54 dB
55705 / 85% / -4.24 dB
56360 / 86% / -3.93 dB
57016 / 87% / -3.63 dB
57671 / 88% / -3.33 dB
58327 / 89% / -3.04 dB
58982 / 90% / -2.75 dB
59637 / 91% / -2.46 dB
60293 / 92% / -2.17 dB
60948 / 93% / -1.89 dB
61603 / 94% / -1.61 dB
62259 / 95% / -1.34 dB
62914 / 96% / -1.06 dB
63569 / 97% / -0.79 dB
64225 / 98% / -0.53 dB
64880 / 99% / -0.26 dB
65536 / 100% / 0.00 dB
66191 / 101% / 0.26 dB
66846 / 102% / 0.52 dB
67502 / 103% / 0.77 dB
68157 / 104% / 1.02 dB
68812 / 105% / 1.27 dB
69468 / 106% / 1.52 dB
70123 / 107% / 1.76 dB
70778 / 108% / 2.01 dB
71434 / 109% / 2.25 dB
72089 / 110% / 2.48 dB
72744 / 111% / 2.72 dB
73400 / 112% / 2.95 dB
74055 / 113% / 3.18 dB
74711 / 114% / 3.41 dB
75366 / 115% / 3.64 dB
76021 / 116% / 3.87 dB
76677 / 117% / 4.09 dB
77332 / 118% / 4.31 dB
77987 / 119% / 4.53 dB
78643 / 120% / 4.75 dB
79298 / 121% / 4.97 dB
79953 / 122% / 5.18 dB
80609 / 123% / 5.39 dB
81264 / 124% / 5.61 dB
81920 / 125% / 5.81 dB
82575 / 126% / 6.02 dB
83230 / 127% / 6.23 dB
83886 / 128% / 6.43 dB
84541 / 129% / 6.64 dB
85196 / 130% / 6.84 dB
85852 / 131% / 7.04 dB
86507 / 132% / 7.23 dB
87162 / 133% / 7.43 dB
87818 / 134% / 7.63 dB
88473 / 135% / 7.82 dB
89128 / 136% / 8.01 dB
89784 / 137% / 8.20 dB
90439 / 138% / 8.39 dB
91095 / 139% / 8.58 dB
91750 / 140% / 8.77 dB
92405 / 141% / 8.95 dB
93061 / 142% / 9.14 dB
93716 / 143% / 9.32 dB
94371 / 144% / 9.50 dB
95027 / 145% / 9.68 dB
95682 / 146% / 9.86 dB
96337 / 147% / 10.04 dB
96993 / 148% / 10.22 dB
97648 / 149% / 10.39 dB
98304 / 150% / 10.57 dB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment