Skip to content

Commit e254a3c

Browse files
committed
Update gnome configuration
1 parent 3e864c8 commit e254a3c

File tree

4 files changed

+115
-93
lines changed

4 files changed

+115
-93
lines changed

roles/gnome/tasks/clocks.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
- name: Configuring World Clocks
3+
when: ansible_os_family == 'Archlinux'
4+
community.general.dconf:
5+
key: "{{ item.key }}"
6+
value: "{{ item.value }}"
7+
loop:
8+
- key: /org/gnome/clocks/world-clocks
9+
value: >-
10+
[{'location': <(uint32 2, <('Los Angeles', 'KCQT', true,
11+
[(0.59370283970450188, -2.0644336110828618)], [(0.59432360095955872,
12+
-2.063741622941031)])>)>}, {'location': <(uint32 2, <('New York',
13+
'KNYC', true, [(0.71180344078725644, -1.2909618758762367)],
14+
[(0.71059804659265924, -1.2916478949920254)])>)>}, {'location':
15+
<(uint32 2, <('Coordinated Universal Time (UTC)', '@UTC', false,
16+
@a(dd) [], @a(dd) [])>)>}, {'location': <(uint32 2, <('Rome', 'LIRU',
17+
true, [(0.73216562121162132, 0.21816615649929119)],
18+
[(0.73129295658562399, 0.21787526247286132)])>)>}, {'location':
19+
<(uint32 2, <('London', 'EGWU', false, [(0.89971722940307675,
20+
-0.007272211034407213)], [(0.89971722940307675,
21+
-0.007272211034407213)])>)>}]
22+
- key: /org/gnome/shell/world-clocks/locations
23+
value: >-
24+
[<(uint32 2, <('Los Angeles', 'KCQT', true, [(0.59370283970450188,
25+
-2.0644336110828618)], [(0.59432360095955872, -2.063741622941031)])>)>,
26+
<(uint32 2, <('New York', 'KNYC', true, [(0.71180344078725644,
27+
-1.2909618758762367)], [(0.71059804659265924,
28+
-1.2916478949920254)])>)>, <(uint32 2, <('Coordinated Universal Time
29+
(UTC)', '@UTC', false, @a(dd) [], @a(dd) [])>)>, <(uint32 2, <('Rome',
30+
'LIRU', true, [(0.73216562121162132, 0.21816615649929119)],
31+
[(0.73129295658562399, 0.21787526247286132)])>)>, <(uint32 2,
32+
<('London', 'EGWU', false, [(0.89971722940307675,
33+
-0.007272211034407213)], [(0.89971722940307675,
34+
-0.007272211034407213)])>)>]
35+
36+
- name: Configuring World Clocks
37+
when: ansible_os_family == 'Debian'
38+
community.general.dconf:
39+
key: "{{ item.key }}"
40+
value: "{{ item.value }}"
41+
loop:
42+
- key: /org/gnome/clocks/world-clocks
43+
value: >-
44+
[{'location': <(uint32 2, <('New York', 'KNYC', true,
45+
[(0.71180344078725644, -1.2909618758762367)], [(0.71059804659265924,
46+
-1.2916478949920254)])>)>}, {'location': <(uint32 2, <('Rome', 'LIRU',
47+
true, [(0.73216562121162132, 0.21816615649929119)],
48+
[(0.73129295658562399, 0.21787526247286132)])>)>}]
49+
- key: /org/gnome/shell/world-clocks/locations
50+
value: >-
51+
[<(uint32 2, <('New York', 'KNYC', true, [(0.71180344078725644,
52+
-1.2909618758762367)], [(0.71059804659265924,
53+
-1.2916478949920254)])>)>, <(uint32 2, <('Rome',
54+
'LIRU', true, [(0.73216562121162132, 0.21816615649929119)],
55+
[(0.73129295658562399, 0.21787526247286132)])>)>]

roles/gnome/tasks/main.yml

Lines changed: 16 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,6 @@
1515
key: /org/gnome/desktop/input-sources/xkb-options
1616
value: "['lv3:switch', 'compose:ralt']"
1717

18-
- name: Getting the internal ID of the GNOME Terminal profile
19-
ansible.builtin.shell: >-
20-
set -e -o pipefail;
21-
dconf list /org/gnome/terminal/legacy/profiles:/ | head -n1 |
22-
awk -F: '{print $2}' | awk -F/ '{print $1}'
23-
register: gnome_terminal_profile
24-
changed_when: false
25-
args:
26-
executable: /bin/bash
27-
28-
- name: Configuring GNOME Terminal
29-
community.general.dconf:
30-
key: "/org/gnome/terminal/legacy/profiles:/:\
31-
{{ gnome_terminal_profile.stdout }}/{{ item.key }}"
32-
value: "{{ item.value | string }}"
33-
loop:
34-
- key: visible-name
35-
value: "'mario'"
36-
- key: use-system-font
37-
value: "false"
38-
- key: font
39-
value: "'{{ gnome_terminal_font[ansible_os_family] }} 12'"
40-
- key: use-theme-colors
41-
value: "false"
42-
- key: audible-bell
43-
value: "false"
44-
- key: foreground-color
45-
value: "'rgb(255,255,255)'"
46-
- key: background-color
47-
value: "'rgb(0,0,0)'"
48-
- key: palette
49-
value: >-
50-
['rgb(0,0,0)', 'rgb(170,0,0)', 'rgb(0,170,0)', 'rgb(170,85,0)',
51-
'rgb(0,0,170)', 'rgb(170,0,170)', 'rgb(0,170,170)', 'rgb(170,170,170)',
52-
'rgb(85,85,85)', 'rgb(255,85,85)', 'rgb(85,255,85)', 'rgb(255,255,85)',
53-
'rgb(85,85,255)', 'rgb(255,85,255)', 'rgb(85,255,255)',
54-
'rgb(255,255,255)']
55-
- key: bold-is-bright
56-
value: "true"
57-
5818
- name: Configuring screen lock settings
5919
community.general.dconf:
6020
key: "{{ item.key }}"
@@ -93,38 +53,8 @@
9353
- /org/gnome/desktop/interface/clock-format
9454
- /org/gtk/settings/file-chooser/clock-format
9555

96-
- name: Configuring World Clocks
97-
community.general.dconf:
98-
key: "{{ item.key }}"
99-
value: "{{ item.value }}"
100-
loop:
101-
- key: /org/gnome/clocks/world-clocks
102-
value: >-
103-
[{'location': <(uint32 2, <('Los Angeles', 'KCQT', true,
104-
[(0.59370283970450188, -2.0644336110828618)], [(0.59432360095955872,
105-
-2.063741622941031)])>)>}, {'location': <(uint32 2, <('New York',
106-
'KNYC', true, [(0.71180344078725644, -1.2909618758762367)],
107-
[(0.71059804659265924, -1.2916478949920254)])>)>}, {'location':
108-
<(uint32 2, <('Coordinated Universal Time (UTC)', '@UTC', false,
109-
@a(dd) [], @a(dd) [])>)>}, {'location': <(uint32 2, <('Rome', 'LIRU',
110-
true, [(0.73216562121162132, 0.21816615649929119)],
111-
[(0.73129295658562399, 0.21787526247286132)])>)>}, {'location':
112-
<(uint32 2, <('London', 'EGWU', false, [(0.89971722940307675,
113-
-0.007272211034407213)], [(0.89971722940307675,
114-
-0.007272211034407213)])>)>}]
115-
- key: /org/gnome/shell/world-clocks/locations
116-
value: >-
117-
[<(uint32 2, <('Los Angeles', 'KCQT', true, [(0.59370283970450188,
118-
-2.0644336110828618)], [(0.59432360095955872, -2.063741622941031)])>)>,
119-
<(uint32 2, <('New York', 'KNYC', true, [(0.71180344078725644,
120-
-1.2909618758762367)], [(0.71059804659265924,
121-
-1.2916478949920254)])>)>, <(uint32 2, <('Coordinated Universal Time
122-
(UTC)', '@UTC', false, @a(dd) [], @a(dd) [])>)>, <(uint32 2, <('Rome',
123-
'LIRU', true, [(0.73216562121162132, 0.21816615649929119)],
124-
[(0.73129295658562399, 0.21787526247286132)])>)>, <(uint32 2,
125-
<('London', 'EGWU', false, [(0.89971722940307675,
126-
-0.007272211034407213)], [(0.89971722940307675,
127-
-0.007272211034407213)])>)>]
56+
- name: Configuring World clocks
57+
ansible.builtin.import_tasks: clocks.yml
12858

12959
- name: Enabling GNOME Shell extensions
13060
when: ansible_os_family == 'Archlinux'
@@ -133,13 +63,13 @@
13363
value: "false"
13464

13565
- name: Activating SimpleWeather extension
136-
when: ansible_os_family == 'Archlinux'
66+
when: ansible_os_family == 'Archlinux' or ansible_os_family == 'Debian'
13767
community.general.dconf:
13868
key: /org/gnome/shell/extensions/simple-weather/is-activated
13969
value: "true"
14070

14171
- name: Enabling individual GNOME Shell extensions
142-
when: ansible_os_family == 'Archlinux'
72+
when: ansible_os_family == 'Archlinux' or ansible_os_family == 'Debian'
14373
community.general.dconf:
14474
key: /org/gnome/shell/enabled-extensions
14575
value: "[{{ gnome_extensions[ansible_os_family] | join(', ') }}]"
@@ -205,7 +135,7 @@
205135
- key: /org/gnome/shell/extensions/arcmenu/searchbar-default-bottom-location
206136
value: "'Top'"
207137
- key: /org/gnome/shell/extensions/arcmenu/distro-icon
208-
value: "6" # archlinux
138+
value: "{{ gnome_arcmenu_icon }}"
209139

210140
- name: Enabling location services # required for night light
211141
when: ansible_os_family == 'Archlinux' or ansible_os_family == 'Debian'
@@ -283,24 +213,19 @@
283213
value: "true"
284214

285215
- name: Configuring SimpleWeather extension
286-
when: ansible_os_family == 'Archlinux'
287-
community.general.dconf:
288-
key: /org/gnome/shell/extensions/simple-weather/theme
289-
value: "'immersive'"
290-
291-
- name: Configuring OpenWeather Refined extension
292-
when: ansible_os_family == 'Archlinux'
216+
when: ansible_os_family == 'Archlinux' or ansible_os_family == 'Debian'
293217
community.general.dconf:
294218
key: "{{ item.key }}"
295219
value: "{{ item.value }}"
296220
loop:
297-
- key: /org/gnome/shell/extensions/openweatherrefined/simplify-degrees
221+
- key: /org/gnome/shell/extensions/simple-weather/theme
222+
value: "'immersive'"
223+
- key: /org/gnome/shell/extensions/simple-weather/symbolic-icons-panel
298224
value: "true"
299-
- key: /org/gnome/shell/extensions/openweatherrefined/weather-provider
300-
value: "'openweathermap'"
301-
- key: /org/gnome/shell/extensions/openweatherrefined/custom-keys
302-
value: "['{{ gnome_openweathermap_api_key[mtype] }}', '', '']"
303-
- key: /org/gnome/shell/extensions/openweatherrefined/my-loc-prov
304-
value: "'ipinfoio'"
305-
- key: /org/gnome/shell/extensions/openweatherrefined/locs
306-
value: "[{{ gnome_openweather_locations | join(', ') }}]"
225+
- key: /org/gnome/shell/extensions/simple-weather/locations
226+
value: >-
227+
['{"isHere":true}', '{"name":"Siena","lat":43.167206,"lon":11.467561}',
228+
'{"name":"Washington","lat":38.8950368,"lon":-77.0365427}']
229+
230+
- name: Configuring GNOME Terminal
231+
ansible.builtin.import_tasks: terminal.yml

roles/gnome/tasks/terminal.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
- name: Getting the internal ID of the GNOME Terminal profile
3+
when: ansible_os_family == 'Debian'
4+
ansible.builtin.shell: >-
5+
set -e -o pipefail;
6+
dconf list /org/gnome/terminal/legacy/profiles:/ | head -n1 |
7+
awk -F: '{print $2}' | awk -F/ '{print $1}'
8+
register: gnome_terminal_profile
9+
changed_when: false
10+
args:
11+
executable: /bin/bash
12+
13+
- name: Configuring GNOME Terminal
14+
when: ansible_os_family == 'Debian'
15+
community.general.dconf:
16+
key: "/org/gnome/terminal/legacy/profiles:/:\
17+
{{ gnome_terminal_profile.stdout }}/{{ item.key }}"
18+
value: "{{ item.value | string }}"
19+
loop:
20+
- key: visible-name
21+
value: "'mario'"
22+
- key: use-system-font
23+
value: "false"
24+
- key: font
25+
value: "'{{ gnome_terminal_font[ansible_os_family] }} 12'"
26+
- key: use-theme-colors
27+
value: "false"
28+
- key: audible-bell
29+
value: "false"
30+
- key: foreground-color
31+
value: "'rgb(255,255,255)'"
32+
- key: background-color
33+
value: "'rgb(0,0,0)'"
34+
- key: palette
35+
value: >-
36+
['rgb(0,0,0)', 'rgb(170,0,0)', 'rgb(0,170,0)', 'rgb(170,85,0)',
37+
'rgb(0,0,170)', 'rgb(170,0,170)', 'rgb(0,170,170)', 'rgb(170,170,170)',
38+
'rgb(85,85,85)', 'rgb(255,85,85)', 'rgb(85,255,85)', 'rgb(255,255,85)',
39+
'rgb(85,85,255)', 'rgb(255,85,255)', 'rgb(85,255,255)',
40+
'rgb(255,255,255)']
41+
- key: bold-is-bright
42+
value: "true"

roles/gnome/vars/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ gnome_extensions:
2323
- "'ubuntu-dock@ubuntu.com'"
2424
Debian:
2525
- "'arcmenu@arcmenu.com'"
26-
- "'bluetooth-quick-connect@bjarosze.gmail.com'"
26+
- "'blur-my-shell@aunetx'"
2727
- "'caffeine@patapon.info'"
2828
- "'dash-to-dock@micxgx.gmail.com'"
2929
- "'debian-updates-indicator@glerro.pm.me'"
3030
- "'gamemode@christian.kellner.me'"
3131
- "'keymapper@houmain.github.com'"
3232
- "'nightthemeswitcher@romainvigier.fr'"
3333
- "'no-overview@fthx'"
34-
- "'openWeatherMenu'"
3534
- "'pano@elhan.io'"
3635
- "'randomwallpaper@iflow.space'"
36+
- "'simple-weather@romanlefler.com'"
3737
- "'ubuntu-appindicators@ubuntu.com'"
3838

3939
gnome_arcmenu_icon:

0 commit comments

Comments
 (0)