Browse Source

i3 and xsession reload functionality

timer
parent
commit
ac3f2ae549
5 changed files with 26 additions and 5 deletions
  1. +14
    -0
      handlers/main.yaml
  2. +7
    -5
      tasks/i3.yaml
  3. +1
    -0
      tasks/rofi.yaml
  4. +3
    -0
      tasks/x11.yaml
  5. +1
    -0
      templates/i3/i3wm.service.j2

+ 14
- 0
handlers/main.yaml View File

@@ -4,3 +4,17 @@
systemd:
daemon_reload: yes
scope: user

- name: xsession reload
systemd:
name: xsession-reload.service
state: started
scope: user
failed_when: false

- name: i3 reload
systemd:
name: i3wm.service
state: reloaded
scope: user
failed_when: false

+ 7
- 5
tasks/i3.yaml View File

@@ -5,16 +5,17 @@
path: ~/.config/i3
state: directory

- name: i3 config
template:
src: i3/i3.config.j2
dest: ~/.config/i3/config

- name: i3 null config
template:
src: i3/i3.null.config.j2
dest: ~/.config/i3/null.config

- name: i3 config
template:
src: i3/i3.config.j2
dest: ~/.config/i3/config
notify: i3 reload

- name: check i3 config
command: i3 -c ~/.config/i3/config -C
changed_when: false
@@ -23,6 +24,7 @@
file:
path: ~/.config/i3blocks
state: directory
notify: i3 reload

- name: i3wm graphical-session service
template:


+ 1
- 0
tasks/rofi.yaml View File

@@ -10,3 +10,4 @@
src: rofi/rofi.theme.j2
dest: ~/.config/rofi/theme
mode: 0755
notify: xsession reload

+ 3
- 0
tasks/x11.yaml View File

@@ -4,17 +4,20 @@
template:
src: x11/Xresources.j2
dest: ~/.Xresources
notify: xsession reload

- name: Xmodmap
template:
src: x11/Xmodmap.j2
dest: ~/.Xmodmap
notify: xsession reload

- name: xsession reload script
template:
src: x11/xsession.reload.fish.j2
dest: ~/.xsession.reload.fish
mode: 0755
notify: xsession reload

- name: xsession reload service
template:


+ 1
- 0
templates/i3/i3wm.service.j2 View File

@@ -5,6 +5,7 @@ PartOf=graphical-session.target
[Service]
Type=exec
ExecStart=i3
ExecReload=i3-msg reload
ExecStopPost=/bin/systemctl --user stop graphical-session.target

[Install]