From e6474660dd8a93120da65e5b2f82888e67db5ba3 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Fri, 5 Jun 2020 19:05:51 +0100 Subject: [PATCH] Add MATE panel layouts --- roles/home-gui/tasks/main.yml | 1 + roles/home-gui/tasks/mate.yml | 39 +++--------------------- roles/home-gui/templates/mate-acp.layout | 2 +- 3 files changed, 7 insertions(+), 35 deletions(-) diff --git a/roles/home-gui/tasks/main.yml b/roles/home-gui/tasks/main.yml index 3704b9b..d3b9d62 100644 --- a/roles/home-gui/tasks/main.yml +++ b/roles/home-gui/tasks/main.yml @@ -7,3 +7,4 @@ - include: mate.yml when: ansible_system != 'Linux' - include: sublimetext.yml +- include: mate.yml diff --git a/roles/home-gui/tasks/mate.yml b/roles/home-gui/tasks/mate.yml index 2a67fdc..a3d17c6 100644 --- a/roles/home-gui/tasks/mate.yml +++ b/roles/home-gui/tasks/mate.yml @@ -1,41 +1,12 @@ --- -- name: Check for MATE layouts directory - stat: - path: "{{ prefix }}/share/mate-panel/layouts" - vars: - prefix: "{{ '/usr' if ansible_system == 'Linux' else '/usr/pkg' if ansible_system == 'NetBSD' else '/usr/local' }}" - register: mate_layouts +- name: Create MATE layouts directory + file: + path: "{{ ansible_env.HOME }}/share/mate-panel/layouts" + state: directory - name: Copy MATE panel layout become: true template: src: mate-acp.layout - dest: "{{ prefix }}/share/mate-panel/layouts/acp.layout" + dest: "{{ ansible_env.HOME }}/share/mate-panel/layouts/acp.layout" vars: prefix: "{{ '/usr' if ansible_system == 'Linux' else '/usr/pkg' if ansible_system == 'NetBSD' else '/usr/local' }}" - when: mate_layouts.stat.exists and mate_layouts.stat.isdir -- name: Set default panel layout - dconf: - key: /org/mate/panel/general/default-layout - value: "'acp'" - register: layout_changed - when: ansible_system == 'Linux' -- name: Reset panel - command: mate-panel --reset || true - when: ansible_system == 'Linux' and layout_changed.changed - ignore_errors: yes - changed_when: false -- name: Add cities to clock applet - dconf: - key: /org/mate/panel/objects/clock/prefs/cities - value: ['', '', '', ''] - when: ansible_system == 'Linux' -- name: Set workspace switcher to two rows - dconf: - key: /org/mate/panel/objects/workspace-switcher/prefs/num-rows - value: 2 - when: ansible_system == 'Linux' -- name: Expand locations in clock - dconf: - key: /org/mate/panel/objects/clock/prefs/expand-locations - value: 'true' - when: ansible_system == 'Linux' diff --git a/roles/home-gui/templates/mate-acp.layout b/roles/home-gui/templates/mate-acp.layout index 660871e..d7e1803 100644 --- a/roles/home-gui/templates/mate-acp.layout +++ b/roles/home-gui/templates/mate-acp.layout @@ -1,7 +1,7 @@ [Toplevel top] expand=true orientation=top -size=48 +size=32 [Object menu] object-type=menu