parent
a37fb2deb6
commit
2f77c9e94e
@ -0,0 +1,20 @@
|
||||
---
|
||||
- name: Set up gpg
|
||||
hosts: localhost
|
||||
connection: local
|
||||
vars:
|
||||
uid: "{{ lookup('env', 'USER') }}"
|
||||
cert_test: "{{ lookup('ansible.builtin.pipe', 'pass show kube1.drive.test.sunet.se/cert') }}"
|
||||
token_test: "{{ lookup('ansible.builtin.pipe', 'pass show kube1.drive.test.sunet.se/token') }}"
|
||||
cert_prod: "{{ lookup('ansible.builtin.pipe', 'pass show kube1.drive.sunet.se/cert') }}"
|
||||
token_prod: "{{ lookup('ansible.builtin.pipe', 'pass show kube1.drive.sunet.se/token') }}"
|
||||
become: false
|
||||
tasks:
|
||||
- name: Add gnupg conf dir
|
||||
ansible.builtin.file:
|
||||
dest: /home/{{ uid }}/.gnupg
|
||||
state: directory
|
||||
- name: Add kube.conf
|
||||
ansible.builtin.template:
|
||||
src: ../templates/gpg-agent.conf.j2
|
||||
dest: /home/{{ uid }}/.gnupg/gpg-agent.conf
|
@ -0,0 +1,5 @@
|
||||
scdaemon-program /usr/lib/gnupg/scdaemon
|
||||
enable-ssh-support
|
||||
# Enable debug logging if needed
|
||||
#debug guru
|
||||
#log-file /dev/shm/gpg-agent.log
|
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
monitors="$(xrandr | awk '/ connected/ {print $1}')"
|
||||
num_monitors="$(echo "${monitors}" | wc -l)"
|
||||
|
||||
if [[ $num_monitors -ge 3 ]]; then
|
||||
xrandr --output eDP-1 --off --output DP-4 --left-of DP-3 --primary --output DP-3 --auto
|
||||
else
|
||||
primary="$(echo "${monitors}" | head -n 1)"
|
||||
output="$(echo "${monitors}" | tail -n 1)"
|
||||
command="xrandr --output --output ${primary} --primary"
|
||||
if [[ ${output} != ${primary} ]]; then
|
||||
command="${command} --right-of ${output} --output ${output} --auto"
|
||||
fi
|
||||
${command}
|
||||
fi
|
||||
feh --bg-scale {{ wallpaper_path }}
|
Loading…
Reference in new issue