Skip to content

Commit 1b4fda9

Browse files
marioortizmaneroAerion
authored andcommitted
Also deprecate SINK_NICKNAME, and small fixes
1 parent 160ae8e commit 1b4fda9

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ Options:
9292
--node-type <node_type>
9393
Whether to consider PulseAudio sinks (output) or sources (input).
9494
All the operations of pulseaudio-control will apply to one of the two.
95-
Pass `input` for the sources, e.g. a microphone
96-
Pass `output` for the sinks, e.g. speakers, headphones
95+
Pass `input` for the sources, e.g. a microphone.
96+
Pass `output` for the sinks, e.g. speakers, headphones.
9797
Default: "output"
9898
--volume-max <int>
9999
Maximum volume to which to allow increasing.
@@ -109,7 +109,7 @@ Options:
109109
--node-nicknames-from <prop>
110110
pactl property to use for node names, unless overriden by
111111
--node-nickname. Its possible values are listed under the 'Properties'
112-
key in the output of `pactl list sinks` and `pactl list sources`
112+
key in the output of `pactl list sinks` and `pactl list sources`.
113113
Default: none
114114
--node-nickname <name>:<nick>
115115
Nickname to assign to given node name, taking priority over
@@ -189,14 +189,14 @@ scroll-down = pulseaudio-control --node-type input --volume-max 130 down
189189

190190
## Useful icons
191191

192-
Here's a list with some icons from different fonts you can copy-paste. Most have an space afterwards so that the module has a bit of spacing. They may appear bugged on your browser if the font isn't available there. Please add yours if they aren't in the list.
192+
Here's a list with some icons from different fonts you can copy-paste. Most have a space afterwards so that the module has a bit of spacing. They may appear bugged on your browser if the font isn't available there. Please add yours if they aren't in the list.
193193

194-
| Font name | Volumes | Muted | Output icons | Input icons |
195-
| ----------------------------------------------- | :-------------: | :--------------: | :------------------------: | :-----------: |
196-
| [FontAwesome](https://fontawesome.com) | `" , "` | `" "` or `" "` | `" "` or `" "` | `", "` |
197-
| [Material](https://material.io/resources/icons) | `" , , "` | `" "` or `"󰍭 "` | `" "` or `" "` or `" "` | `"󰍬, 󰍮"` |
198-
| Emoji | `"🔈 ,🔉 ,🔊 "` | `"🔇 "` | `"🔈 "` or `"🎧 "` | `"🎙️ "` |
199-
| Emoji v2 | `"🕨 ,🕩 ,🕪 "` | `"🔇 "` | `"🕨 "` or `"🎧 "` | `"🎤 "` |
194+
| Font name | Volumes | Muted | Output icons | Input icons |
195+
| ----------------------------------------------- | :-------------: | :--------------: | :------------------------: | :---------: |
196+
| [FontAwesome](https://fontawesome.com) | `" , "` | `" "` or `" "` | `" "` or `" "` | `", "` |
197+
| [Material](https://material.io/resources/icons) | `" , , "` | `" "` or `"󰍭 "` | `" "` or `" "` or `" "` | `"󰍬, 󰍮"` |
198+
| Emoji | `"🔈 ,🔉 ,🔊 "` | `"🔇 "` | `"🔈 "` or `"🎧 "` | `"🎙️ "` |
199+
| Emoji v2 | `"🕨 ,🕩 ,🕪 "` | `"🔇 "` | `"🕨 "` or `"🎧 "` | `"🎤 "` |
200200

201201
Most of these can be used after downloading a [Nerd Font](https://www.nerdfonts.com/) and including it in your [Polybar config](https://github.com/polybar/polybar/wiki/Fonts). For example:
202202

pulseaudio-control.bash

+10-6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# be displayed for users using it in custom FORMAT
1010
# shellcheck disable=SC2034
1111
ICON_SINK="Replaced by ICON_NODE, see https://github.com/marioortizmanero/polybar-pulseaudio-control/releases/tag/v3.0.0"
12+
SINK_NICKNAME="Replaced by NODE_NICKNAME, see https://github.com/marioortizmanero/polybar-pulseaudio-control/releases/tag/v3.0.0"
1213

1314
# Defaults for configurable values, expected to be set by command-line arguments
1415
AUTOSYNC="no"
@@ -29,13 +30,16 @@ declare -a NODE_BLACKLIST
2930

3031
# Special variable: within the script, pactl, grep, and awk commands are used
3132
# on sinks or sources, depending on NODE_TYPE.
33+
#
3234
# The commands are almost always the same, except for the sink/source part.
3335
# In order to reduce duplication, this variable is used for commands that behave
3436
# the same, regardless of the NODE_TYPE.
37+
#
3538
# Having only the "radix" (ink/ource) and omitting the first letter enables us
36-
# to use that single variable.
37-
# S-ink , s-ink , s-ink -s, S-ink -s
38-
# S-ource, s-ource, s-ource-s, S-ource-s
39+
# to use that single variable:
40+
#
41+
# S-ink , s-ink , s-ink -s, S-ink -s
42+
# S-ource, s-ource, s-ource-s, S-ource-s
3943
SINK_OR_SOURCE="ink"
4044

4145
# Environment & global constants for the script
@@ -432,8 +436,8 @@ Options:
432436
--node-type <node_type>
433437
Whether to consider PulseAudio sinks (output) or sources (input).
434438
All the operations of pulseaudio-control will apply to one of the two.
435-
Pass \`input\` for the sources, e.g. a microphone
436-
Pass \`output\` for the sinks, e.g. speakers, headphones
439+
Pass \`input\` for the sources, e.g. a microphone.
440+
Pass \`output\` for the sinks, e.g. speakers, headphones.
437441
Default: \"$NODE_TYPE\"
438442
--volume-max <int>
439443
Maximum volume to which to allow increasing.
@@ -449,7 +453,7 @@ Options:
449453
--node-nicknames-from <prop>
450454
pactl property to use for node names, unless overriden by
451455
--node-nickname. Its possible values are listed under the 'Properties'
452-
key in the output of \`pactl list sinks\` and \`pactl list sources\`
456+
key in the output of \`pactl list sinks\` and \`pactl list sources\`.
453457
Default: none
454458
--node-nickname <name>:<nick>
455459
Nickname to assign to given node name, taking priority over

0 commit comments

Comments
 (0)