From 9865834e16a84c3c09798a75565b4b151bef9621 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Wed, 17 Mar 2021 07:47:31 +0100 Subject: [PATCH] Added i3lock-fancy-multimonitor (AUR) --- arch.yaml | 2 +- roles/user-account/files/i3/config | 2 +- roles/user-account/tasks/main.yaml | 126 +++++++++++++++-------------- roles/xorg/meta/main.yaml | 2 + roles/xorg/tasks/main.yaml | 10 ++- 5 files changed, 79 insertions(+), 63 deletions(-) create mode 100644 roles/xorg/meta/main.yaml diff --git a/arch.yaml b/arch.yaml index 4bc1d3d..643a6a3 100644 --- a/arch.yaml +++ b/arch.yaml @@ -10,6 +10,7 @@ roles: - user-account + - aur-builder - sudo - dotfiles - git @@ -23,7 +24,6 @@ - docker - xorg - gnome-keyring - - aur-builder - zoom - git-flow - slack diff --git a/roles/user-account/files/i3/config b/roles/user-account/files/i3/config index 5067d0b..4583f8a 100644 --- a/roles/user-account/files/i3/config +++ b/roles/user-account/files/i3/config @@ -18,7 +18,7 @@ font pango:DejaVu Sans Mono 11 default_border pixel 1 # Set lock screen -exec --no-startup-id xautolock -time 20 -locker 'i3lock --color=000000' & +exec --no-startup-id xautolock -time 20 -locker 'i3lock-fancy-multimonitor --no-text --blur=0x6' & # Use pactl to adjust volume in PulseAudio. bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% diff --git a/roles/user-account/tasks/main.yaml b/roles/user-account/tasks/main.yaml index 8c275c2..b16668f 100644 --- a/roles/user-account/tasks/main.yaml +++ b/roles/user-account/tasks/main.yaml @@ -1,123 +1,129 @@ --- - name: setup user account user: - name: "{{ username }}" - password: "{{ password }}" - create_home: yes - state: present - update_password: always + name: "{{ username }}" + password: "{{ password }}" + create_home: yes + state: present + update_password: always register: account - name: ensure .ssh exists become_user: "{{ account.name }}" file: - path: "/home/{{ account.name }}/.ssh" - state: directory - mode: "0700" + path: "/home/{{ account.name }}/.ssh" + state: directory + mode: "0700" - name: copy ssh key become_user: "{{ account.name }}" copy: - src: "ssh/" - dest: "/home/{{ account.name }}/.ssh/" - mode: "0600" + src: "ssh/" + dest: "/home/{{ account.name }}/.ssh/" + mode: "0600" - name: ensure .gnupg exists become_user: "{{ account.name }}" file: - path: "/home/{{ account.name }}/.gnupg" - state: directory - mode: "0700" + path: "/home/{{ account.name }}/.gnupg" + state: directory + mode: "0700" - name: copy gpg keys become_user: "{{ account.name }}" copy: - src: "gnupg/" - dest: "/home/{{ account.name }}/.gnupg/" - mode: "0600" + src: "gnupg/" + dest: "/home/{{ account.name }}/.gnupg/" + mode: "0600" - name: set gpg-agent pinentry-program become_user: "{{ account.name }}" lineinfile: - path: "/home/{{ account.name }}/.gnupg/gpg-agent.conf" - regexp: "^pinentry-program " - line: "pinentry-program /usr/bin/pinentry-gtk-2" - mode: 0644 - create: yes + path: "/home/{{ account.name }}/.gnupg/gpg-agent.conf" + regexp: "^pinentry-program " + line: "pinentry-program /usr/bin/pinentry-gtk-2" + mode: 0644 + create: yes - name: set gpg-agent max-cache-ttl become_user: "{{ account.name }}" lineinfile: - path: "/home/{{ account.name }}/.gnupg/gpg-agent.conf" - regexp: "^max-cache-ttl " - line: "max-cache-ttl 60480000" + path: "/home/{{ account.name }}/.gnupg/gpg-agent.conf" + regexp: "^max-cache-ttl " + line: "max-cache-ttl 60480000" - name: set gpg-agent default-cache-ttl become_user: "{{ account.name }}" lineinfile: - path: "/home/{{ account.name }}/.gnupg/gpg-agent.conf" - regexp: "^default-cache-ttl " - line: "default-cache-ttl 60480000" + path: "/home/{{ account.name }}/.gnupg/gpg-agent.conf" + regexp: "^default-cache-ttl " + line: "default-cache-ttl 60480000" - name: setup xprofile become_user: "{{ account.name }}" lineinfile: - path: "/home/{{ account.name }}/.xprofile" - regexp: "^xsetroot " - line: "xsetroot -solid \"#000000\"" - mode: 0644 - create: yes + path: "/home/{{ account.name }}/.xprofile" + regexp: "^xsetroot " + line: 'xsetroot -solid "#000000"' + mode: 0644 + create: yes - name: install user icon become_user: "{{ account.name }}" copy: - src: face.icon - dest: "/home/{{ account.name }}/.face.icon" - mode: "0644" + src: face.icon + dest: "/home/{{ account.name }}/.face.icon" + mode: "0644" - name: grant sddm read permission to home acl: - path: "/home/{{ account.name }}/" - entity: sddm - etype: user - permissions: x - state: present + path: "/home/{{ account.name }}/" + entity: sddm + etype: user + permissions: x + state: present - name: grant sddm read permission user icon acl: - path: "/home/{{ account.name }}/.face.icon" - entity: sddm - etype: user - permissions: r - state: present + path: "/home/{{ account.name }}/.face.icon" + entity: sddm + etype: user + 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" + 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 + 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: - path: "/home/{{ account.name }}/.config/i3status" - state: directory - mode: "0700" + path: "/home/{{ account.name }}/.config/i3status" + state: directory + mode: "0700" - name: install i3status config become_user: "{{ account.name }}" copy: - src: i3status/config - dest: "/home/{{ account.name }}/.config/i3status/config" - mode: "0644" - force: yes + src: i3status/config + dest: "/home/{{ account.name }}/.config/i3status/config" + mode: "0644" + force: yes +- name: configure i3lock + become_user: "{{ account.name }}" + lineinfile: + path: "/home/{{ account.name }}/.config/i3/config" + regexp: "xautolock" + line: "exec --no-startup-id xautolock -time 20 -locker 'i3lock-fancy-multimonitor --no-text --blur=0x6' &" diff --git a/roles/xorg/meta/main.yaml b/roles/xorg/meta/main.yaml new file mode 100644 index 0000000..36ba984 --- /dev/null +++ b/roles/xorg/meta/main.yaml @@ -0,0 +1,2 @@ +dependencies: + - kewlfft.aur diff --git a/roles/xorg/tasks/main.yaml b/roles/xorg/tasks/main.yaml index 2111581..7b64524 100644 --- a/roles/xorg/tasks/main.yaml +++ b/roles/xorg/tasks/main.yaml @@ -14,11 +14,19 @@ - i3-wm - i3status - xautolock - - i3lock - dmenu - alacritty - flameshot +- name: install AUR packages + aur: + name: "{{ item }}" + state: latest + become: yes + become_user: "{{ aur_builder.name }}" + loop: + - i3lock-fancy-multimonitor + - name: configure sddm ini_file: path: /etc/sddm.conf.d/uid.conf