summary refs log tree commit diff
path: root/run_gnome_tweaks.sh.tmpl
blob: 4bf0ed05a25cc685ab2cb70580a894aee3b2669b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash

set -e

dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'"

# Title bar positioning is indicated relative to colon :<rightPlacement> or <leftPlacement>:
{{ if eq .gnome.titlebarButtonPlacement "left" }}
dconf write /org/gnome/desktop/wm/preferences/button-layout "'{{ .gnome.buttonLayout }}:'"
{{ else }}
dconf write /org/gnome/desktop/wm/preferences/button-layout "':{{ .gnome.buttonLayout }}'"
{{ end }}

if systemd-detect-virt &>/dev/null; then
  dconf write /org/gnome/desktop/session/idle-delay "uint32 0"
  dconf write /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type "'nothing'"
fi

if [[ "$(hostnamectl chassis 2>/dev/null)" =~ ^(vm|laptop)$ ]]; then
  dconf write /org/gnome/desktop/peripherals/mouse/natural-scroll "'{{ .gnome.naturalScroll }}'"
  dconf write /org/gnome/desktop/peripherals/touchpad/two-finger-scrolling-enabled "true"
fi