2.0 KiB
2.0 KiB
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 controllerPulseAudio
- Install
pavucontrol
as GUI controler ofPulseAudio
Check pactl
controller is working and learn how to use it and add to i3
- Play music on youtube or Spotify
- Open
pavucontrol
to check sound is player correctly - Find correct Sink by
pactl list
, the playing one should be the "Sink" that has "State: Running" - Increase volume by
pactl set-sink-volume <sink number> 70%
, which change volume and should be reflected onpavucontrol
and your ear - 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
- Play music on Spotify
- Pause the music by
playerctl play-pause
, and check whether the music stopped - After confimring this commandline worked, add it to with keybind in your i3
Media control in separate mode
- Create a mode "media" in i3 configuration
- In the mode, add bindsym to control media flow
Media control using TUI
- Install
pulsemixer
- 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)
- Install
pavucontrol
- Use
pavucontrol
to change volume