From 7647a5745c257f6bfbd19b3e75f36923fce06a29 Mon Sep 17 00:00:00 2001 From: Sophie Date: Sat, 14 Oct 2023 19:50:26 +0400 Subject: Update gnome tweaks natural scroll and titlebar placement This change updates .chezmoi.toml.tmpl to make natural mouse scrolling optional. It allows for title bar button placements to also be configurable either left or right. --- run_gnome_tweaks.sh.tmpl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'run_gnome_tweaks.sh.tmpl') diff --git a/run_gnome_tweaks.sh.tmpl b/run_gnome_tweaks.sh.tmpl index b5d440e..4bf0ed0 100755 --- a/run_gnome_tweaks.sh.tmpl +++ b/run_gnome_tweaks.sh.tmpl @@ -3,7 +3,13 @@ set -e dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'" -dconf write /org/gnome/desktop/wm/preferences/button-layout "'{{ .gnome.buttonLayout }}'" + +# Title bar positioning is indicated relative to colon : or : +{{ 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" @@ -11,6 +17,6 @@ if systemd-detect-virt &>/dev/null; then fi if [[ "$(hostnamectl chassis 2>/dev/null)" =~ ^(vm|laptop)$ ]]; then - dconf write /org/gnome/desktop/peripherals/mouse/natural-scroll "true" + dconf write /org/gnome/desktop/peripherals/mouse/natural-scroll "'{{ .gnome.naturalScroll }}'" dconf write /org/gnome/desktop/peripherals/touchpad/two-finger-scrolling-enabled "true" fi -- cgit 1.4.1-2-gfad0