From 7178d3884222850e02334626f0e7af2f4706e555 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Sat, 6 Mar 2021 16:08:44 +0100 Subject: [PATCH] Moved i3 config file setup to user-account role --- .../config => user-account/files}/i3/config | 0 roles/user-account/tasks/main.yaml | 16 ++++++++++++++++ roles/xorg/files/config/i3status/config | 17 ----------------- roles/xorg/tasks/main.yaml | 14 -------------- 4 files changed, 16 insertions(+), 31 deletions(-) rename roles/{xorg/files/config => user-account/files}/i3/config (100%) delete mode 100644 roles/xorg/files/config/i3status/config diff --git a/roles/xorg/files/config/i3/config b/roles/user-account/files/i3/config similarity index 100% rename from roles/xorg/files/config/i3/config rename to roles/user-account/files/i3/config diff --git a/roles/user-account/tasks/main.yaml b/roles/user-account/tasks/main.yaml index f9226c4..8c275c2 100644 --- a/roles/user-account/tasks/main.yaml +++ b/roles/user-account/tasks/main.yaml @@ -91,6 +91,21 @@ permissions: r state: present +- name: ensure i3 config-dir exists + become_user: "{{ account.name }}" + file: + path: "/home/{{ account.name }}/.config/i3" + state: directory + mode: "0700" + +- name: install i3 config + become_user: "{{ account.name }}" + copy: + src: i3/config + dest: "/home/{{ account.name }}/.config/i3/config" + mode: "0644" + force: no + - name: ensure i3status config-dir exists become_user: "{{ account.name }}" file: @@ -104,4 +119,5 @@ src: i3status/config dest: "/home/{{ account.name }}/.config/i3status/config" mode: "0644" + force: yes diff --git a/roles/xorg/files/config/i3status/config b/roles/xorg/files/config/i3status/config deleted file mode 100644 index 9216f6b..0000000 --- a/roles/xorg/files/config/i3status/config +++ /dev/null @@ -1,17 +0,0 @@ -general { - colors = true - interval = 5 -} - -order += "battery all" -order += "tztime local" - -battery all { - format = "%status %percentage %remaining" - format_down = "" - last_full_capacity = true -} - -tztime local { - format = "%d.%m.%Y %H:%M" -} diff --git a/roles/xorg/tasks/main.yaml b/roles/xorg/tasks/main.yaml index f85ae11..2111581 100644 --- a/roles/xorg/tasks/main.yaml +++ b/roles/xorg/tasks/main.yaml @@ -37,17 +37,3 @@ command: cmd: localectl --no-convert set-x11-keymap de pc105 nodeadkeys creates: /etc/X11/xorg.conf.d/00-keyboard.conf - -- name: install i3 config - become_user: "{{ account.name }}" - copy: - src: config/i3/config - dest: "/home/{{ account.name }}/.config/i3/config" - force: no - -- name: install i3status config - become_user: "{{ account.name }}" - copy: - src: config/i3status/config - dest: "/home/{{ account.name }}/.config/i3status/config" - force: yes