2021-02-24 17:12:09 +00:00
#!/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
2021-03-19 14:30:53 +00:00
2021-04-16 12:22:43 +00:00
gsettings set org.gnome.shell favorite-apps " ['org.gnome.Terminal.desktop', 'org.gnome.Nautilus.desktop', ' $firefox .desktop', 'code.desktop'] "
2021-02-24 17:12:09 +00:00
}
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 "
2021-04-29 10:19:57 +00:00
gsettings set org.gnome.desktop.input-sources xkb-options "['compose:caps']"
2021-02-24 17:12:09 +00:00
}
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'
2021-02-25 19:06:23 +00:00
gsettings set org.gtk.Settings.FileChooser sort-directories-first true
2021-02-24 17:12:09 +00:00
}
set_nautilus_preferences
2021-02-25 19:06:23 +00:00
set_gnome_terminal_preferences ( ) {
gsettings set org.gnome.Terminal.Legacy.Settings theme-variant 'dark'
gsettings set org.gnome.Terminal.Legacy.Settings menu-accelerator-enabled false
gsettings set org.gnome.Terminal.Legacy.Settings shortcuts-enabled false
}
set_gnome_terminal_preferences
2021-03-21 17:40:50 +00:00
set_custom_keyboard_shortcuts ( ) {
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'Launch Terminal'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command 'gnome-terminal'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding '<Primary><Alt>t'
}
set_custom_keyboard_shortcuts
2021-02-25 19:06:23 +00:00
set_misc_preferences ( ) {
# Disable alert sounds.
gsettings set org.gnome.desktop.sound event-sounds false
# Turn off natural scrolling.
gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false
2021-03-11 11:30:46 +00:00
# Configure the top bar and calendar.
gsettings set org.gnome.desktop.interface clock-show-date true
2021-03-11 11:50:52 +00:00
gsettings set org.gnome.desktop.interface clock-show-seconds false
2021-03-11 11:30:46 +00:00
gsettings set org.gnome.desktop.interface show-battery-percentage true
gsettings set org.gnome.desktop.calendar show-weekdate true
# Add minimise and maximise buttons to the window title bars.
gsettings set org.gnome.desktop.wm.preferences button-layout 'appmenu:minimize,maximize,close'
# Stop dialogue boxes from 'sticking' to their parent windows.
gsettings set org.gnome.mutter attach-modal-dialogs false
2021-04-26 20:47:06 +00:00
# Solid-colour background.
gsettings set org.gnome.desktop.background picture-uri ''
gsettings set org.gnome.desktop.background primary-color '#3a6ea5'
2021-02-25 19:06:23 +00:00
}
set_misc_preferences