diff --git a/.gitignore b/.gitignore index fe53d90..c09404f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .vagrant *.swp -./hosts +hosts diff --git a/host_vars/work.yml b/host_vars/work.yml index db628b4..0bf82ea 100644 --- a/host_vars/work.yml +++ b/host_vars/work.yml @@ -7,19 +7,19 @@ displays: mode: 1920x1080 scale: 1.6 - name: screen1 - id: DP-7 + id: DP-8 x: 0 y: 0 mode: 1920x1080 scale: 1 - name: screen2 - id: DP-5 + id: DP-6 mode: 1920x1080 x: 1920 y: 0 scale: 1 - - name: screen2 - id: DP-6 + - name: screen3 + id: DP-7 mode: 1920x1080 x: 3840 y: 0 diff --git a/hosts b/hosts index 797f3ca..123bceb 100644 --- a/hosts +++ b/hosts @@ -1,4 +1,3 @@ [cli] [desktop] -osz ansible_connection=local - +work ansible_connection=local diff --git a/roles/sway/templates/hosts/sway/work/config.j2 b/roles/sway/templates/hosts/sway/work/config.j2 index b084070..40f565f 100644 --- a/roles/sway/templates/hosts/sway/work/config.j2 +++ b/roles/sway/templates/hosts/sway/work/config.j2 @@ -3,6 +3,7 @@ set $laptop "{{ (displays | selectattr('name', 'eq', 'laptop')).0.id }}" set $screen1 "{{ (displays | selectattr('name', 'eq', 'screen1')).0.id }}" set $screen2 "{{ (displays | selectattr('name', 'eq', 'screen2')).0.id }}" +set $screen3 "{{ (displays | selectattr('name', 'eq', 'screen3')).0.id }}" # dpms output * dpms on diff --git a/roles/sway/templates/kanshi.config.j2 b/roles/sway/templates/kanshi.config.j2 index 604c65d..9a65a70 100644 --- a/roles/sway/templates/kanshi.config.j2 +++ b/roles/sway/templates/kanshi.config.j2 @@ -1,3 +1,10 @@ +profile { + output "{{ (displays | selectattr('name', 'eq', 'screen3')).0.id }}" position {{ (displays | selectattr('name', 'eq', 'screen3')).0.x }},{{ (displays | selectattr('name', 'eq', 'screen3')).0.y }} mode {{ (displays | selectattr('name', 'eq', 'screen3')).0.mode }} scale {{ (displays | selectattr('name', 'eq', 'screen3')).0.scale }} + output "{{ (displays | selectattr('name', 'eq', 'screen2')).0.id }}" position {{ (displays | selectattr('name', 'eq', 'screen2')).0.x }},{{ (displays | selectattr('name', 'eq', 'screen2')).0.y }} mode {{ (displays | selectattr('name', 'eq', 'screen2')).0.mode }} scale {{ (displays | selectattr('name', 'eq', 'screen2')).0.scale }} + output "{{ (displays | selectattr('name', 'eq', 'screen1')).0.id }}" position {{ (displays | selectattr('name', 'eq', 'screen1')).0.x }},{{ (displays | selectattr('name', 'eq', 'screen1')).0.y }} mode {{ (displays | selectattr('name', 'eq', 'screen1')).0.mode }} scale {{ (displays | selectattr('name', 'eq', 'screen1')).0.scale }} + output "{{ (displays | selectattr('name', 'eq', 'laptop')).0.id }}" position {{ (displays | selectattr('name', 'eq', 'laptop')).0.x }},{{ (displays | selectattr('name', 'eq', 'laptop')).0.y }} mode {{ (displays | selectattr('name', 'eq', 'laptop')).0.mode }} scale {{ (displays | selectattr('name', 'eq', 'laptop')).0.scale }} +} + profile { output "{{ (displays | selectattr('name', 'eq', 'screen2')).0.id }}" disable output "{{ (displays | selectattr('name', 'eq', 'screen1')).0.id }}" position {{ (displays | selectattr('name', 'eq', 'screen1')).0.x }},{{ (displays | selectattr('name', 'eq', 'screen1')).0.y }} mode {{ (displays | selectattr('name', 'eq', 'screen1')).0.mode }} scale {{ (displays | selectattr('name', 'eq', 'screen1')).0.scale }}