-
Notifications
You must be signed in to change notification settings - Fork 36
Migration
This guide helps you migrate from other volume control tools to i3-volume.
- From pulseaudio-utils (pactl/paplay)
- From amixer/alsamixer
- From other volume control scripts
- Command Equivalents
- Configuration Migration
If you're migrating from PulseAudio's pactl command:
| pulseaudio-utils | i3-volume |
|---|---|
pactl set-sink-volume @DEFAULT_SINK@ +5% |
volume up 5 |
pactl set-sink-volume @DEFAULT_SINK@ -5% |
volume down 5 |
pactl set-sink-volume @DEFAULT_SINK@ 50% |
volume set 50 |
pactl set-sink-mute @DEFAULT_SINK@ toggle |
volume mute |
pactl list sinks short |
volume list sinks |
pactl set-default-sink <sink> |
volume switch <sink> |
-
PipeWire vs PulseAudio:
i3-volumeuses PipeWire/WirePlumber, not PulseAudio - Command Syntax: Simpler syntax - no need to specify sink
-
Decimal Support:
i3-volumesupports decimal values (set 45.5) -
dB Support:
i3-volumesupports dB values (set -6dB)
-
Verify PipeWire is running:
systemctl --user status pipewire pipewire-pulse
-
Install i3-volume:
git clone https://github.com/hastinbe/i3-volume.git ~/i3-volume -
Update keybindings:
# Old (pactl) bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% # New (i3-volume) bindsym XF86AudioRaiseVolume exec --no-startup-id ~/i3-volume/volume -n up 5
-
Update scripts: Replace
pactlcommands withvolumecommands
If you're migrating from ALSA's amixer:
| amixer | i3-volume |
|---|---|
amixer set Master 5%+ |
volume up 5 |
amixer set Master 5%- |
volume down 5 |
amixer set Master 50% |
volume set 50 |
amixer set Master toggle |
volume mute |
amixer scontrols |
volume list sinks |
-
Higher Level:
i3-volumeworks at the PipeWire level, not ALSA level - Multiple Devices: Easier to manage multiple audio devices
- More Features: Profiles, per-app control, normalization, etc.
- Notifications: Built-in notification support
-
Ensure PipeWire is running (replaces direct ALSA access)
-
Update keybindings:
# Old (amixer) bindsym XF86AudioRaiseVolume exec amixer set Master 5%+ # New (i3-volume) bindsym XF86AudioRaiseVolume exec --no-startup-id ~/i3-volume/volume -n up 5
-
No ALSA config needed: PipeWire handles ALSA devices automatically
Many volume control scripts use similar patterns. Here are equivalents:
# Many scripts
volume_up() { pactl set-sink-volume @DEFAULT_SINK@ +5%; }
volume_down() { pactl set-sink-volume @DEFAULT_SINK@ -5%; }
# i3-volume
volume up 5
volume down 5# Many scripts
volume_up() {
pactl set-sink-volume @DEFAULT_SINK@ +5%
notify-send "Volume: $(get_volume)%"
}
# i3-volume
volume -n up 5 # Built-in notification support# Many scripts
get_volume() {
pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}' | sed 's/%//'
}
# i3-volume
volume output i3blocks # Built-in status bar formats| Task | Old Command | i3-volume |
|---|---|---|
| Increase by 5% | pactl set-sink-volume @DEFAULT_SINK@ +5% |
volume up 5 |
| Decrease by 5% | pactl set-sink-volume @DEFAULT_SINK@ -5% |
volume down 5 |
| Set to 50% | pactl set-sink-volume @DEFAULT_SINK@ 50% |
volume set 50 |
| Toggle mute | pactl set-sink-mute @DEFAULT_SINK@ toggle |
volume mute |
| Get volume | pactl get-sink-volume @DEFAULT_SINK@ |
volume output json |
| Task | Old Command | i3-volume |
|---|---|---|
| List sinks | pactl list sinks short |
volume list sinks |
| Switch sink | pactl set-default-sink <sink> |
volume switch <sink> |
| Next sink | (manual script) | volume next |
| Previous sink | (manual script) | volume prev |
| Task | Old Command | i3-volume |
|---|---|---|
| Toggle mic mute | pactl set-source-mute @DEFAULT_SOURCE@ toggle |
volume mic mute |
| Increase mic | pactl set-source-volume @DEFAULT_SOURCE@ +5% |
volume mic up 5 |
| Decrease mic | pactl set-source-volume @DEFAULT_SOURCE@ -5% |
volume mic down 5 |
| Set mic volume | pactl set-source-volume @DEFAULT_SOURCE@ 75% |
volume mic set 75 |
If you had a script like this:
#!/bin/bash
# Old script
VOLUME_STEP=5
NOTIFY=true
increase_volume() {
pactl set-sink-volume @DEFAULT_SINK@ +${VOLUME_STEP}%
if [ "$NOTIFY" = true ]; then
notify-send "Volume: $(get_volume)%"
fi
}Migrate to i3-volume config:
# ~/.config/i3-volume/config
DEFAULT_STEP=5
DISPLAY_NOTIFICATIONS=trueThen just use: volume up
If you had a script like this:
#!/bin/bash
# Old script
amixer set Master 5%+
VOL=$(amixer get Master | grep -oP '\d+%' | head -1)
notify-send "Volume: $VOL"Migrate to: volume -n up 5
# Old (pactl)
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
# New (i3-volume)
bindsym XF86AudioRaiseVolume exec --no-startup-id ~/i3-volume/volume -n up 5
bindsym XF86AudioLowerVolume exec --no-startup-id ~/i3-volume/volume -n down 5
bindsym XF86AudioMute exec --no-startup-id ~/i3-volume/volume -n mute# Old (pactl)
XF86AudioRaiseVolume
pactl set-sink-volume @DEFAULT_SINK@ +5%
# New (i3-volume)
XF86AudioRaiseVolume
~/i3-volume/volume up 5After migrating, you'll have access to new features:
-
Decimal precision:
volume set 45.5 -
dB support:
volume set -6dB -
Relative operations:
volume set +10 -
Volume profiles:
volume profile save quiet -
Per-application control:
volume app firefox up 5 -
Volume boost:
volume boost 20 60 -
Balance control:
volume balance -10 -
Volume normalization:
volume normalize apply -
Smooth fades:
volume -f 1000 up 10 -
Volume history:
volume history -
Undo:
volume undo
- Status bars: Built-in formats for i3blocks, polybar
- Notifications: Multiple notification methods
- Mouse wheel: Automatic support with i3blocks
- Exit codes: Better script integration
If you see sink-related errors:
- List available sinks:
volume list sinks - Update any hardcoded sink names in your config
- Use sink nicks (short names) for better stability
PipeWire and PulseAudio may handle volume scaling differently:
- Check current volume:
volume output json - Adjust if needed:
volume set <desired_level> - Save as profile:
volume profile save default
If your old scripts don't work:
- Check exit codes:
volume --exit-code - Use verbose mode:
volume -v up 5 - Verify PipeWire is running:
systemctl --user status pipewire
- Getting Started - Setup guide
- Configuration - Configuration options
- Features - All available features
- Examples - Common use cases
- Common Issues - Troubleshooting