@@ -19,7 +19,14 @@ | |||||
path: ~/.config/i3blocks | path: ~/.config/i3blocks | ||||
state: directory | state: directory | ||||
- name: i3blocks config | |||||
- name: i3wm graphical-session service | |||||
template: | template: | ||||
src: i3/i3blocks.config.j2 | |||||
dest: ~/.config/i3blocks/config | |||||
src: i3/i3wm.service.j2 | |||||
dest: ~/.config/systemd/user/i3wm.service | |||||
notify: systemd daemon-reload | |||||
- name: i3wm graphical-session service enabled | |||||
systemd: | |||||
name: i3wm.service | |||||
enabled: true | |||||
scope: user |
@@ -22,6 +22,12 @@ | |||||
dest: ~/.xsession.reload.fish | dest: ~/.xsession.reload.fish | ||||
mode: 0755 | mode: 0755 | ||||
- name: xsession systemd target | |||||
template: | |||||
src: x11/xsession.target.j2 | |||||
dest: ~/.config/systemd/user/xsession.target | |||||
notify: systemd daemon-reload | |||||
- name: xsessionrc | - name: xsessionrc | ||||
template: | template: | ||||
src: x11/xsessionrc.j2 | src: x11/xsessionrc.j2 | ||||
@@ -0,0 +1,11 @@ | |||||
[Unit] | |||||
Description=i3 Window Manager | |||||
PartOf=graphical-session.target | |||||
[Service] | |||||
ExecStart=/usr/bin/i3 | |||||
ExecStopPost=/bin/systemctl --user stop graphical-session.target | |||||
Restart=on-failure | |||||
[Install] | |||||
RequiredBy=xsession.target |
@@ -0,0 +1,3 @@ | |||||
[Unit] | |||||
Description=X session managed by systemd | |||||
BindsTo=graphical-session.target |
@@ -2,13 +2,4 @@ | |||||
{{ansible_managed|comment}} | {{ansible_managed|comment}} | ||||
if [ -d /etc/profile.d ]; then | |||||
for i in /etc/profile.d/*.sh; do | |||||
if [ -r $i ]; then | |||||
. $i | |||||
fi | |||||
done | |||||
unset i | |||||
fi | |||||
exec fish ~/.xsession.fish | |||||
exec systemctl --user start --wait xsession.target |