Add gnome setup script
This commit is contained in:
parent
22c09a5f52
commit
2090fd6dbf
3 changed files with 57 additions and 0 deletions
36
roles/home-gui/files/gnome-setup.sh
Normal file
36
roles/home-gui/files/gnome-setup.sh
Normal file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
test -x /usr/bin/gsettings || (echo "gsettings not found" && exit 1)
|
||||
|
||||
set_favorites_bar () {
|
||||
local firefox
|
||||
if [ -r /usr/share/applications/firefox-esr.desktop ] && [ ! -r /usr/share/applications/firefox.desktop ]
|
||||
then
|
||||
firefox=firefox-esr
|
||||
else
|
||||
firefox=firefox
|
||||
fi
|
||||
gsettings set org.gnome.shell favorite-apps "['org.gnome.Terminal.desktop', 'org.gnome.Nautilus.desktop', '$firefox.desktop']"
|
||||
}
|
||||
set_favorites_bar
|
||||
|
||||
set_keyboard_and_language () {
|
||||
local us="('xkb', 'us')"
|
||||
local ca="('xkb', 'ca+multix')"
|
||||
local layouts
|
||||
if [ "$(echo $LANG | sed 's/_.*//')" = "fr" ]
|
||||
then
|
||||
layouts="[$ca, $us]"
|
||||
else
|
||||
layouts="[$us, $ca]"
|
||||
fi
|
||||
gsettings set org.gnome.desktop.input-sources sources "$layouts"
|
||||
}
|
||||
set_keyboard_and_language
|
||||
|
||||
set_nautilus_preferences () {
|
||||
gsettings set org.gnome.nautilus.list-view default-zoom-level 'small'
|
||||
gsettings set org.gnome.nautilus.preferences default-folder-viewer 'list-view'
|
||||
gsettings set org.gtk.Settings.FileChooser sort-directories-first 'true'
|
||||
}
|
||||
set_nautilus_preferences
|
20
roles/home-gui/tasks/gnome.yml
Normal file
20
roles/home-gui/tasks/gnome.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
# Copyright 2021 Anthony Perkins
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Copy MATE Clock reset script
|
||||
ansible.builtin.copy:
|
||||
src: gnome-setup.sh
|
||||
dest: "{{ ansible_env.HOME }}/bin/reset-gnome-setup"
|
||||
mode: '0755'
|
|
@ -17,5 +17,6 @@
|
|||
|
||||
- include: dotfiles.yml
|
||||
- include: firefox.yml
|
||||
- include: gnome.yml
|
||||
- include: mate.yml
|
||||
- include: sublimetext.yml
|
||||
|
|
Loading…
Reference in a new issue