-
Notifications
You must be signed in to change notification settings - Fork 13
/
pa-mixer.example.cfg
142 lines (115 loc) · 6.43 KB
/
pa-mixer.example.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# -*- comment-start: ";" -*- (modify-syntax-entry ?\; "<")
;; This config is read from ~/.pa-mixer.cfg or ~/.pulseaudio-mixer-cli.cfg by default.
;; Uses ini format - https://docs.python.org/3/library/configparser.html#supported-ini-file-structure
;; Everything that starts with "#" or ";" is a comment here, inline comments allowed.
;; For true/false values, any of 1/0, yes/no, on/off, true/false should work.
[default]
adjust-step: 2 ; percent of the bar, 0-100.0
;; 1.0 means 100% (max) "normal" (non-soft-boosted) level.
;; For software-boosted levels >1.0, mixer will display bar a bit differently,
;; splitting it into "normal" (see char-bar-fill option) and "boost" part (char-bar-softvol).
;; Increasing volume in software will negatively affect audio quality, esp. for large adjustments.
max-volume: 1.0
min-volume: 0.05
;; "volume-type" can be useful to tweak if default "flat" adjustment
;; is too coarse at lower volumes yet provides insufficient max values.
;; Possible values:
;; - flat (default) - linear adjustment from min-volume to max-volume
;; - log - logarithmic adjustment using natural (base=e) logarithm
;; - log-N - same as "log" but with specified number (integer or float) as base
;; "flat" is equivalent to "log-1", with higher base
;; values allowing for more precise control at lower volumes.
;; See also: -i/--flat-to-log and -j/--log-to-flat script options.
; volume-type: flat
;; "volume-after-max", when enabled, allows to increase volume above "max-volume" value.
;; I.e. tapping "right" will increase volume until maximum allowed in pulseaudio with this option.
volume-after-max: yes
;; "use-media-name" displays "media.name" property instead of process parameters,
;; which can be good if player supports pulse output natively and sets it (e.g. mpv).
use-media-name: yes
;; "use-device-name" shows e.g. "alsa_output.pci-0000_04_00.1.hdmi-stereo",
;; from Device object "Name" property. Not very nice, but can be more precise.
; use-device-name: yes
; focus-default: first ; either "first" or "last"
; focus-new-items: yes ; to move focus to new items as they appear
; focus-new-items-delay: 5.0 ; min seconds since last focus change to trigger this
;; focus-wrap-* controls what happens when going past first/last item on the list
; focus-wrap-first: no
; focus-wrap-last: no
; name-len-max: 100 ; cut names to that even if they fit into window width
; name-cut-from: left ; "left" or "right"
; name-show-level: yes ; show 0-100 volume level on the left ("--" for 0-, "++" for 100+)
;; char-* options are for configuring how things will look, should all be single character
; char-bar-fill: #
; char-bar-empty: -
; char-bar-softvol: X ; for part of volume bar that goes into software-boosted level
; char-name-replace-broken: _ ; replacement chars for broken or non-utf-8 stuff, if any
; overkill-redraw: no ; re-creates ncurses window on terminal resize
; overkill-updates: no ; always rebuild sink/stream list from scratch, instead of incremental updates
; verbose: no ; don't close stderr
;; Disabling "reconnect" will cause script to exit when disconnected from pulseaudio server.
;; Otherwise it runs endlessly, establishing new connection when old one goes down.
; reconnect: yes
;; "show-stored-values" enables option ("x" key) to
;; display module-stream-restore db levels, if they are available.
; show-stored-values: yes
;; "show-controls: no" can be used to hide bottom line with these, if any.
; show-controls: yes
;; "event-proc-delay" (seconds) is a fixed delay before updating UI for any pulse events.
;; It's there purely for performance optimization reasons, to batch and discard
;; multiple change or new-remove events for same stream in rapid succession.
;; If set to 0 (default), UI will be updated for every single event as they arrive.
; event-proc-delay: 0.3
;; "force-refresh-interval" (seconds) - interval between forced refresh of displayed info.
;; Default is to only do anything on events - changes from pulse or key presses.
;; Can be useful as a fallback in case of any bugs with state updates.
;; Setting to 0 (default) disables the feature.
; force-refresh-interval: 120.0
;; stream-* sections are matched to PA stream/sink parameters upon first seeing them,
;; with "match[key]" parameters being regexp matches for "key"
;; and "equals[key]" - exact string value checks.
;; All other supported parameters are applied to every matched stream.
;; Match logic is "every specified check should match".
;; All checks happen in the same order as written here, several sections can be applied to the same stream.
;; To dump stream parameters, use "i" key or: ./pa-mixer.py --dump-stream-parameters 2>params.txt
[stream-vlc]
equals[application.process.binary]: vlc ; exact string match
volume-max: 0.2 ; 0-1 range
; volume-min:
; volume-set:
[stream-players]
match[application.process.binary]: ^(vlc|mpv)$ ; regexp match
volume-max: 0.3
[stream-sink-hdmi]
match[alsa.id]: ^HDMI\b
hidden: yes ; wont be displayed in the list
muted: yes
[stream-sink-analog-volume]
equals[alsa.id]: ID 440 Analog
volume-set: 0.6
[stream-sink-analog-force-port]
equals[alsa.id]: ID 440 Analog
;; "port" option sets output port upon seeing the card for the first time (i.e. upon start).
;; It is only valid for sinks, not for individual audio streams.
;; Use e.g. "pactl list-sinks" to see the list of "ports:" and "active port:" there.
port: analog-output-headphones
;; "reapply" option forces re-applying all the checks of this section on each change event.
;; As opposed to only applying these settings when sink/stream was first seen.
;; Can be used to fix port against plug/unplug changes, or lock/cap volume reliably.
reapply: yes
[stream-firefox]
equals[application.name]: Firefox
;; "name" sets the display name for matched streams, just in this UI, not pulse itself.
;; If non-unique, auto-generated tag will be appended at the end.
name: Godzilla Flamewolf
;; volume-max + reapply will ensure that app can never set its volume higher than that.
;; Can be particularly useful where third-parties (e.g. websites, youtube) can control volume.
volume-max: 0.5
reapply: yes
[stream-notifications]
equals[media.role]: event
volume-set: 0.35
;; "muted-if-file" applies "muted" status to stream depending on whether specified path exists.
;; User homedirs (e.g. ~/.pa-mute.flag) and shell-like env-vars in path are expanded.
;; In this example, event sounds will be muted while file is present, unmuted otherwise.
muted-if-file: $XDG_RUNTIME_DIR/pulse/ctrl.mute-events