Fix for FreeBSD

This commit is contained in:
Anthony Rose 2019-10-13 22:46:15 +01:00
parent 7281c00d4f
commit 9e7e1bc64f
2 changed files with 11 additions and 12 deletions

View file

@ -1,11 +1,11 @@
--- ---
- name: Copy MATE panel layout - name: Copy MATE panel layout
become: true become: true
copy: template:
src: mate-acp.layout src: mate-acp.layout
dest: "{{ prefix }}/share/mate-panel/layouts/acp.layout" dest: "{{ prefix }}/share/mate-panel/layouts/acp.layout"
vars: vars:
prefix: "{{ '/usr/local' if ansible_distribution == 'FreeBSD' else '/usr' }}" prefix: "{{ '/usr' if ansible_system == 'Linux' else '/usr/local' }}"
- name: Detect running mate-panel process - name: Detect running mate-panel process
pids: pids:
name: mate-panel name: mate-panel
@ -15,24 +15,23 @@
key: /org/mate/panel/general/default-layout key: /org/mate/panel/general/default-layout
value: "'acp'" value: "'acp'"
register: layout_changed register: layout_changed
when: mate_panel.pids | length > 0 when: mate_panel.pids | length > 0 and ansible_system == 'Linux'
- name: Reset panel - name: Reset panel
command: mate-panel --reset || true command: mate-panel --reset || true
when: layout_changed.changed and mate_panel.pids | length > 0 when: layout_changed.changed and mate_panel.pids | length > 0 and ansible_system == 'Linux'
ignore_errors: yes
changed_when: false changed_when: false
- name: Add cities to clock applet - name: Add cities to clock applet
dconf: dconf:
key: /org/mate/panel/objects/clock/prefs/cities key: /org/mate/panel/objects/clock/prefs/cities
value: ['<location name="" city="Luton" timezone="Europe/London" latitude="51.866669" longitude="-0.366667" code="EGGW" current="true"/>', '<location name="" city="Washington" timezone="America/New_York" latitude="38.848331" longitude="-77.034164" code="KDCA" current="false"/>', '<location name="" city="San Francisco" timezone="America/Los_Angeles" latitude="37.619720" longitude="-122.364723" code="KSFO" current="false"/>', '<location name="UTC" city="" timezone="GMT" latitude="-0.000000" longitude="-0.000000" code="-" current="false"/>'] value: ['<location name="" city="Luton" timezone="Europe/London" latitude="51.866669" longitude="-0.366667" code="EGGW" current="true"/>', '<location name="" city="Washington" timezone="America/New_York" latitude="38.848331" longitude="-77.034164" code="KDCA" current="false"/>', '<location name="" city="San Francisco" timezone="America/Los_Angeles" latitude="37.619720" longitude="-122.364723" code="KSFO" current="false"/>', '<location name="UTC" city="" timezone="GMT" latitude="-0.000000" longitude="-0.000000" code="-" current="false"/>']
when: mate_panel.pids | length > 0 when: mate_panel.pids | length > 0 and ansible_system == 'Linux'
- name: Set workspace switcher to two rows - name: Set workspace switcher to two rows
dconf: dconf:
key: /org/mate/panel/objects/workspace-switcher/prefs/num-rows key: /org/mate/panel/objects/workspace-switcher/prefs/num-rows
value: 2 value: 2
when: mate_panel.pids | length > 0 when: mate_panel.pids | length > 0 and ansible_system == 'Linux'
- name: Expand locations in clock - name: Expand locations in clock
dconf: dconf:
key: /org/mate/panel/objects/clock/prefs/expand-locations key: /org/mate/panel/objects/clock/prefs/expand-locations
value: 'true' value: 'true'
when: mate_panel.pids | length > 0 when: mate_panel.pids | length > 0 and ansible_system == 'Linux'

View file

@ -11,28 +11,28 @@ locked=true
[Object terminal] [Object terminal]
object-type=launcher object-type=launcher
launcher-location=/usr/share/applications/mate-terminal.desktop launcher-location={{ prefix }}/share/applications/mate-terminal.desktop
toplevel-id=top toplevel-id=top
position=10 position=10
locked=true locked=true
[Object file-browser] [Object file-browser]
object-type=launcher object-type=launcher
launcher-location=/usr/share/applications/caja-browser.desktop launcher-location={{ prefix }}/share/applications/caja-browser.desktop
toplevel-id=top toplevel-id=top
position=20 position=20
locked=true locked=true
[Object text-editor] [Object text-editor]
object-type=launcher object-type=launcher
launcher-location=/usr/share/applications/gvim.desktop launcher-location={{ prefix }}/share/applications/gvim.desktop
toplevel-id=top toplevel-id=top
position=30 position=30
locked=true locked=true
[Object web-browser] [Object web-browser]
object-type=launcher object-type=launcher
launcher-location=/usr/share/applications/firefox-esr.desktop launcher-location={{ prefix }}/share/applications/firefox-esr.desktop
toplevel-id=top toplevel-id=top
position=40 position=40
locked=true locked=true