Volume control and volume notifications
Fixes issue #31 where if the -p
option is provided it can cause i3-volume and the notification daemon (if supported) to both draw a progress bar
Replaces all uses of pacmd
with pactl
. The rationale for the change
is for compatibility with pipeware, specifically on Arch Linux. See
issue #29
Auto-detect notification method (requires DBus) Ability to play an event sound when volume changed Support for libcanberra for playing event sounds Repects server capabilities of your notification server
i3-volume use to default to libnotify when a notification method was not
specified. When using a libnotify compatible notification daemon like
notify-osd or dunst, this is a non-issue. Now if DBus
is available this is no longer the case. When available, i3-volume will ask what your notification server is, if supported it will send notifications to that server, if not supported it will fallback to libnotify and try anyway.
The sound played during volume change events can be set by the
SOUND_VOLUME_CHANGED
environment variable. It currently defaults to the
freedesktop sound theme (sound-theme-freedesktop
package). If you wish
to use a custom sound, you can specify it like so:
env SOUND_VOLUME_CHANGED=/path/to/soundfile.oga ~/i3-volume/volume -P up 5
Currently i3-volume does not support XDG sound theming spec and requires path
to the full sound file. The exception of this is when using libcanberra
(-C
) which does support XDG. However, by default i3-volume tells
libcanberra to play the sound file instead of a sound event id. To get
libcanberra to use the sound event id instead, we need to set
SOUND_VOLUME_CHANGED to a non-existent file like so:
env SOUND_VOLUME_CHANGED= ~/i3-volume/volume -CP up 5
When discoverable the capabilities of the notification server is requested. Currently this is limited to libnotify compatible servers. If icons are supported, i3-volume will display a volume icon. If the notification server can handle sound, i3-volume will play volume change sound events if enabled (-P) through the notification server instead of externally.
pacmd list-sinks
during the script's execution, except for listen
.Commands are used to perform an operation, such as muting or changing the volume. In versions prior to 3.x they were command-line options. This change frees up and slims down the amount of options, and makes the script straight-forward to use.
Commands include: up
, down
, set
, mute
, listen
, output
, outputs
, notifications
, help
-d
is now the down
command-i
is now the up
command-m
is now the mute
command-o
is now the output
command-v
is now the set
command-M
is now -m
Listen mode for PulseAudio (-L)
- Subscribes to and listens for changes on the provided, or default, PulseAudio sink.
- When notifications (-n) are enabled, they will be triggered for these events.
- When the status bar (-t) and signal (-s) are set, the status bar will be signaled to update.