mirror of
https://github.com/pigmonkey/spark.git
synced 2026-01-23 02:24:09 +00:00
Add GNOME support
Add ability to install the GNOME desktop environment. Most common global settings (date and time, power management, touchpad settings, theme) can be configured via Ansible variables. See "group_vars/all" file.
This commit is contained in:
parent
20160b1e8d
commit
8d8ec13b8f
10 changed files with 139 additions and 1 deletions
|
|
@ -220,6 +220,41 @@ gdm:
|
|||
tap_to_click: True
|
||||
accessibility_menu: True
|
||||
|
||||
desktop_environment: i3
|
||||
gnome:
|
||||
night_light:
|
||||
enabled: True
|
||||
color_temperature: 4000 # in Kelvin
|
||||
date_time:
|
||||
show_date_in_clock: True
|
||||
show_weeks_in_calendar: True
|
||||
battery:
|
||||
show_percentage: True
|
||||
power:
|
||||
sleep_timeout_when_computer_on_ac: 3600 # in seconds
|
||||
timeout_action_when_computer_on_ac: suspend
|
||||
sleep_timeout_when_computer_on_battery: 1800 # in seconds
|
||||
timeout_action_when_computer_on_battery: suspend
|
||||
power_button_action: suspend
|
||||
touchpad:
|
||||
tap_to_click: True
|
||||
natural_scrolling: True
|
||||
disabled_while_typing: True
|
||||
online_accounts_support: True
|
||||
lock_screen:
|
||||
automatic_lock: True
|
||||
lock_screen_after_blank_for: 0 # in seconds
|
||||
show_notifications: True
|
||||
show_full_name_of_user: True
|
||||
theme:
|
||||
theme_name: Adwaita
|
||||
icon_theme_name: Adwaita
|
||||
font_name: Dejavu Sans 13
|
||||
dark_variant: True
|
||||
gnome_shell:
|
||||
disable_top_left_hot_corner: False
|
||||
extensions_support: True
|
||||
|
||||
base_fonts:
|
||||
- terminus-font
|
||||
- cantarell-fonts
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@
|
|||
- { role: x, tags: ['x'] }
|
||||
- { role: lightdm, tags: ['lightdm'], when: "display_manager == 'lightdm'" }
|
||||
- { role: gdm, tags: ['gdm'], when: "display_manager == 'gdm'" }
|
||||
- { role: i3, tags: ['i3'] }
|
||||
- { role: i3, tags: ['i3'], when: "desktop_environment == 'i3'" }
|
||||
- { role: gnome, tags: ['gnome'], when: "desktop_environment == 'gnome'" }
|
||||
- { role: pass, tags: ['pass'] }
|
||||
- { role: iptables, tags: ['iptables'] }
|
||||
- { role: nettools, tags: ['nettools'] }
|
||||
|
|
|
|||
5
roles/gnome/meta/main.yml
Normal file
5
roles/gnome/meta/main.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
dependencies:
|
||||
- { role: x }
|
||||
- { role: gdm }
|
||||
- { role: networkmanager }
|
||||
13
roles/gnome/tasks/dconf.yml
Normal file
13
roles/gnome/tasks/dconf.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
- name: Creating gnome.d directory for DConf
|
||||
file: path=/etc/dconf/db/gnome.d state=directory mode=0755
|
||||
|
||||
- name: Configuring GNOME
|
||||
template: src=gnome.d/00-spark.j2 dest=/etc/dconf/db/gnome.d/00-spark mode=0644
|
||||
notify: update DConf database
|
||||
|
||||
- name: Configuring DConf
|
||||
lineinfile: path=/etc/dconf/profile/user line={{ item }} create=yes mode=0644
|
||||
with_items:
|
||||
- "user-db:user"
|
||||
- "system-db:gnome"
|
||||
14
roles/gnome/tasks/gnome_shell.yml
Normal file
14
roles/gnome/tasks/gnome_shell.yml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
- name: Disabling GNOME Shell top left hot corner
|
||||
aur: name=gnome-shell-extension-no-topleft-hot-corner user={{ user.name }}
|
||||
when: "gnome.gnome_shell.disable_top_left_hot_corner"
|
||||
|
||||
- name: Enabling GNOME Shell top left hot corner
|
||||
pacman: name=gnome-shell-extension-no-topleft-hot-corner state=absent
|
||||
when: "not gnome.gnome_shell.disable_top_left_hot_corner"
|
||||
|
||||
- name: Configuring GNOME Shell Extensions support
|
||||
pacman: name={{ item }} state={{ "present" if gnome.gnome_shell.extensions_support else "absent" }}
|
||||
with_items:
|
||||
- gnome-shell-extensions
|
||||
- chrome-gnome-shell
|
||||
6
roles/gnome/tasks/gtk.yml
Normal file
6
roles/gnome/tasks/gtk.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
- name: Creating GTK+ 3 system wide settings
|
||||
file: path=/etc/gtk-3.0 state=directory mode=0755
|
||||
|
||||
- name: Configuring GTK+ 3 theme
|
||||
template: src=gtk-3.0/settings.ini.j2 dest=/etc/gtk-3.0/settings.ini mode=0644
|
||||
13
roles/gnome/tasks/main.yml
Normal file
13
roles/gnome/tasks/main.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
- name: Install GNOME
|
||||
pacman: name={{ item }} state=present
|
||||
with_items:
|
||||
- gnome
|
||||
- gnome-extra
|
||||
- gnome-tweaks
|
||||
- xorg-server-xwayland
|
||||
|
||||
- include: dconf.yml
|
||||
- include: gtk.yml
|
||||
- include: gnome_shell.yml
|
||||
- include: online_accounts.yml
|
||||
3
roles/gnome/tasks/online_accounts.yml
Normal file
3
roles/gnome/tasks/online_accounts.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- name: Configuring GNOME Online Accounts integration
|
||||
pacman: name=gvfs-goa state={{ "present" if gnome.online_accounts_support else "absent" }}
|
||||
37
roles/gnome/templates/gnome.d/00-spark.j2
Normal file
37
roles/gnome/templates/gnome.d/00-spark.j2
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# This configuration file is created by Ansible. Manual changes would get lost.
|
||||
|
||||
# Night Light settings
|
||||
[org/gnome/settings-daemon/plugins/color]
|
||||
night-light-enabled={{ gnome.night_light.enabled | ternary('true', 'false') }}
|
||||
night-light-temperature={{ gnome.night_light.color_temperature | default(4000) }}
|
||||
|
||||
[org/gnome/desktop/calendar]
|
||||
show-weekdate={{ gnome.date_time.show_weeks_in_calendar | ternary('true', 'false') }}
|
||||
|
||||
[org/gnome/desktop/interface]
|
||||
# Date and time settings
|
||||
clock-show-date={{ gnome.date_time.show_date_in_clock | ternary('true', 'false') }}
|
||||
|
||||
# Battery settings
|
||||
show-battery-percentage={{ gnome.battery.show_percentage | ternary('true', 'false') }}
|
||||
|
||||
# Touchpad settings
|
||||
[org/gnome/desktop/peripherals/touchpad]
|
||||
tap-to-click={{ gnome.touchpad.tap_to_click | ternary('true', 'false') }}
|
||||
natural-scroll={{ gnome.touchpad.natural_scrolling | ternary('true', 'false') }}
|
||||
disable-while-typing={{ gnome.touchpad.disabled_while_typing | ternary('true', 'false') }}
|
||||
|
||||
# Power settings
|
||||
[org/gnome/settings-daemon/plugins/power]
|
||||
sleep-inactive-ac-timeout={{ gnome.power.sleep_timeout_when_computer_on_ac | default(3600) }}
|
||||
sleep-inactive-ac-type='{{ gnome.power.timeout_action_when_computer_on_ac | default("hibernate") }}'
|
||||
sleep-inactive-battery-timeout={{ gnome.power.sleep_timeout_when_computer_on_battery | default(3600) }}
|
||||
sleep-inactive-battery-type='{{ gnome.power.timeout_action_when_computer_on_battery | default("hibernate") }}'
|
||||
power-button-action='{{ gnome.power.power_button_action | default("suspend") }}'
|
||||
|
||||
# Lock screen settings
|
||||
[org/gnome/desktop/screensaver]
|
||||
lock-enabled={{ gnome.lock_screen.automatic_lock | ternary('true', 'false') }}
|
||||
lock-delay={{ gnome.lock_screen.lock_screen_after_blank_for | default(0) }}
|
||||
status-message-enabled={{ gnome.lock_screen.show_notifications | ternary('true', 'false') }}
|
||||
show-full-name-in-top-bar={{ gnome.lock_screen.show_full_name_of_user | ternary('true', 'false') }}
|
||||
11
roles/gnome/templates/gtk-3.0/settings.ini.j2
Normal file
11
roles/gnome/templates/gtk-3.0/settings.ini.j2
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[Settings]
|
||||
{% if gnome.theme.theme_name %}
|
||||
gtk-icon-theme-name = {{ gnome.theme.theme_name }}
|
||||
{% endif %}
|
||||
{% if gnome.theme.icon_theme_name %}
|
||||
gtk-theme-name = {{ gnome.theme.icon_theme_name }}
|
||||
{% endif %}
|
||||
{% if gnome.theme.font_name %}
|
||||
gtk-font-name = {{ gnome.theme.font_name }}
|
||||
{% endif %}
|
||||
gtk-application-prefer-dark-theme = {% if gnome.theme.dark_variant %}true{% else %}false{% endif %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue