@@ -70,3 +70,11 @@ i3_hide_bar: false | |||||
i3_hide_border_one_window: false | i3_hide_border_one_window: false | ||||
home_xhosts_allow: [] | home_xhosts_allow: [] | ||||
pulseaudio_load_system_config: true | |||||
pulseaudio_jack_sink_enabled: false | |||||
pulseaudio_jack_sink_channels: 2 | |||||
pulseaudio_jack_sink_client_name: PulseAudio | |||||
pulseaudio_jack_source_enabled: false | |||||
pulseaudio_jack_source_channels: 2 | |||||
pulseaudio_jack_source_client_name: PulseAudio |
@@ -12,6 +12,13 @@ | |||||
scope: user | scope: user | ||||
failed_when: false | failed_when: false | ||||
- name: restart pulseaudio | |||||
systemd: | |||||
name: pulseaudio.service | |||||
state: restarted | |||||
scope: user | |||||
failed_when: false | |||||
- name: i3 reload | - name: i3 reload | ||||
systemd: | systemd: | ||||
name: i3wm.service | name: i3wm.service | ||||
@@ -6,3 +6,14 @@ | |||||
dest: ~/.pulse-cookie | dest: ~/.pulse-cookie | ||||
mode: 0600 | mode: 0600 | ||||
when: home_copy_pulseaudio_cookie | when: home_copy_pulseaudio_cookie | ||||
- name: pulse directory | |||||
file: | |||||
path: ~/.pulse | |||||
state: directory | |||||
- name: pulse default config | |||||
template: | |||||
src: pulseaudio/default.pa.j2 | |||||
dest: ~/.pulse/default.pa | |||||
notify: restart pulseaudio |
@@ -0,0 +1,25 @@ | |||||
{{ansible_managed|comment}} | |||||
{% if pulseaudio_load_system_config %} | |||||
.include /etc/pulse/default.pa | |||||
{% endif %} | |||||
.fail | |||||
{% if pulseaudio_jack_sink_enabled %} | |||||
load-module module-jack-sink channels={{pulseaudio_jack_sink_channels}} client_name="{{pulseaudio_jack_sink_client_name}}" connect=0 | |||||
{% endif %} | |||||
{% if pulseaudio_jack_source_enabled %} | |||||
load-module module-jack-source channels={{pulseaudio_jack_source_channels}} client_name="{{pulseaudio_jack_source_client_name}}" connect=0 | |||||
{% endif %} | |||||
{% if pulseaudio_default_sink is defined %} | |||||
set-default-sink {{pulseaudio_default_sink}} | |||||
{% endif %} | |||||
{% if pulseaudio_default_source is defined %} | |||||
set-default-source {{pulseaudio_default_source}} | |||||
{% endif %} | |||||
.ifexists module-x11-publish.so | |||||
load-module module-x11-publish | |||||
.endif |