# Media control in i3 There are multiple choices of audio program available, the i3 config file I followed at beginning using amixer, while I choose PulseAudio. Please check "addy-dclxvi/i3-staterpack" His volume/music control config is shown as below: ``` # change volume bindsym XF86AudioRaiseVolume exec amixer -q set Master bindsym XF86AudioLowerVolume exec amixer -q set Master 5%- bindsym XF86AudioMute exec amixer set Master toggle # music control bindsym XF86AudioNext exec mpc next bindsym XF86AudioPrev exec mpc prev bindsym XF86AudioPlay exec mpc toggle bindsym XF86AudioStop exec mpc stop ``` Following are the process I used in my Media/Volume control in i3 ## Volume Control using PulseAudio * Install `PulseAudio` (Pulse Audio Sound server system) * Install `pactl` as commandline controller `PulseAudio` * Install `pavucontrol` as GUI controler of `PulseAudio` ### Check `pactl` controller is working and learn how to use it and add to i3 1. Play music on youtube or Spotify 2. Open `pavucontrol` to check sound is player correctly 3. Find correct Sink by `pactl list`, the playing one should be the "Sink" that has "State: Running" 4. Increase volume by `pactl set-sink-volume 70%`, which change volume and should be reflected on `pavucontrol` and your ear 5. Now you know which sink is using and add the command line into i3 config ## Check `playerctl` controller is working and learn how to use it and add to i3 1. Play music on Spotify 2. Pause the music by `playerctl play-pause`, and check whether the music stopped 3. After confimring this commandline worked, add it to with keybind in your i3 ## Media control in separate mode 1. Create a mode "media" in i3 configuration 2. In the mode, add bindsym to control media flow ## Media control using TUI 1. Install `pulsemixer` 2. Use `pulsemixer` TUI to change volume, this program cannot do single channel change, it can only do change on both channel at once ## Media control using GUI (Suggested in Ubuntu Distro) 1. Install `pavucontrol` 2. Use `pavucontrol` to change volume