diff options
author | Alen <alen@dotfiles.xyz> | 2023-09-12 00:06:32 +0400 |
---|---|---|
committer | Alen <alen@dotfiles.xyz> | 2023-09-12 00:12:42 +0400 |
commit | ad77903eabafa151b7ef9a7d4c26713d7a04a5f8 (patch) | |
tree | bcfe5ba3bd91414573a27bbcbccc76304c8d7ae2 | |
parent | a6806275b7d1e881516688a9866b513d3a9508e4 (diff) |
Add shoddy GNOME tweaks
-rwxr-xr-x | run_gnome_tweaks.sh.tmpl | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/run_gnome_tweaks.sh.tmpl b/run_gnome_tweaks.sh.tmpl new file mode 100755 index 0000000..1c6664c --- /dev/null +++ b/run_gnome_tweaks.sh.tmpl @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +set -e + +# TODO: Move the lookPath dconf and OS check to chezmoi ignore level +{{ if lookPath "dconf" }} + dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'" + {{ if eq .chezmoi.username "sophie" }} + dconf write /org/gnome/desktop/wm/preferences/button-layout "':appmenu,close'" + {{ else }} + dconf write /org/gnome/desktop/wm/preferences/button-layout "'close,appmenu:'" + {{ end }} + + {{ if lookPath "systemd-detect-virt" }} + {{ $virt := output "systemd-detect-virt" }} + {{ if ne $virt "none" }} + dconf write /org/gnome/desktop/session/idle-delay "uint32 0" + dconf write /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type "'nothing'" + {{ end }} + {{ end }} + + {{ if lookPath "hostnamectl" }} + {{ $chassis := output "hostnamectl" "chassis" }} + {{ if or (eq $chassis "laptop") (eq $chassis "vm") }} + dconf write /org/gnome/desktop/peripherals/mouse/natural-scroll "true" + dconf write /org/gnome/desktop/peripherals/touchpad/two-finger-scrolling-enabled "true" + {{ end }} + {{ end }} +{{ end }} |