Their is no need to run a command to start a sound sever with i3. alsa producers the sound not pulse.
You can also control your sound volume & mute from your keyboard. On my keyboard I use FN + the sound control keys
amixer script Make a file in your home called amixer add the below code make sure the script is executable.
#!/bin/bash
vol=$(amixer get 'Master',0 | egrep -o '[0-9]{1,3}%')
echo "${vol%[%]}"
-------------------------------------------------------
This for MX
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -q set Master 2dB+ unmute
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -q set Master 2dB- unmute
bindsym XF86AudioMute exec --no-startup-id amixer -q set Master toggle
-------------------------------------------------------------
This for antiX
bindsym XF86AudioRaiseVolume exec --no-startup-id "amixer -q sset Master,0 2+ unmute"
bindsym XF86AudioLowerVolume exec --no-startup-id "amixer -q sset Master,0 2- unmute"
bindsym XF86AudioMute exec --no-startup-id "amixer -q sset Master,0 toggle"
----------------------------------------------------------
Set default sound card... Must be done from sudo
Open alsa mixer with sudo press F6 or S select your card then type sudo alsactl store.
sudo alsamixer
sudo alsactl store
and
Setting the default device
Jump to: navigation, search
Find your desired card with:
cat /proc/asound/cards
and then create /etc/asound.conf with following: OR you can just for the single user .asoundrc and place this in your home directory. But only use one not both at the same time it is up to you what way you to go.
defaults.pcm.card 1
defaults.ctl.card 1
Replace "1" with number of your card determined above.
----------------------------------------
Also if you want to see the sound volume icon on your bar add this to your bar line. tray_output primary
Code: Select all
# Conkybar
bar {
status_command ~/.config/i3/conkybar.sh
i3bar_command i3bar --transparency
height 28
workspace_buttons yes
tray_output primary
font pango:JetBrainsMono-Regular 10
position top
tray_output primary
strip_workspace_numbers no
binding_mode_indicator no
# Polybar
#bar {
# status_command ~/.config/polybar/launch.sh
# tray_output primary
# bumblebee-status
#bar {
# font pango:JetBrains Mono Regular 10
# position top
# tray_output none
# i3bar_command i3bar --transparency