aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xarchsetup43
1 files changed, 26 insertions, 17 deletions
diff --git a/archsetup b/archsetup
index 53679b8..d044d1c 100755
--- a/archsetup
+++ b/archsetup
@@ -934,24 +934,33 @@ user_customizations() {
(sudo -u "$username" update-desktop-database "/home/$username/.local/share/applications" \
>> "$logfile" 2>&1 ) || true
- # install dconf before writing GTK/GNOME desktop settings (provides dconf)
+ # GTK and GNOME desktop interface settings — read by GTK apps and
+ # xdg-desktop-portal-gtk. Written as a system-wide dconf db rather than
+ # per-user dbus-launch dconf writes: the system path needs no session
+ # bus (which the prior approach lacked during install, exit-1ing both
+ # blocks), and portal-gtk reads the settings on first login without
+ # the ~50s settings-proxy timeout. Users can still override per-user.
pacman_install dconf
-
- # GTK file chooser settings (stored in dconf, can't be stowed)
- action="configuring GTK file chooser" && display "task" "$action"
- (sudo -u "$username" dbus-launch dconf write /org/gtk/settings/file-chooser/sort-directories-first true \
- >> "$logfile" 2>&1 ) || error_warn "$action" "$?"
-
- # GNOME desktop interface settings (required for fast xdg-desktop-portal-gtk startup)
- # Without these, portal-gtk waits ~50s for a settings proxy timeout
- action="configuring GNOME interface settings in dconf" && display "task" "$action"
- (sudo -u "$username" dbus-launch bash -c "
- dconf write /org/gnome/desktop/interface/color-scheme \"'prefer-dark'\"
- dconf write /org/gnome/desktop/interface/gtk-theme \"'Adwaita-dark'\"
- dconf write /org/gnome/desktop/interface/icon-theme \"'Papirus-Dark'\"
- dconf write /org/gnome/desktop/interface/cursor-theme \"'Bibata-Modern-Ice'\"
- dconf write /org/gnome/desktop/interface/cursor-size 24
- " >> "$logfile" 2>&1 ) || error_warn "$action" "$?"
+ action="configuring system dconf defaults" && display "task" "$action"
+ (
+ install -d -m 0755 /etc/dconf/profile /etc/dconf/db/site.d
+ cat > /etc/dconf/profile/user <<'EOF'
+user-db:user
+system-db:site
+EOF
+ cat > /etc/dconf/db/site.d/00-archsetup-defaults <<'EOF'
+[org/gtk/settings/file-chooser]
+sort-directories-first=true
+
+[org/gnome/desktop/interface]
+color-scheme='prefer-dark'
+gtk-theme='Adwaita-dark'
+icon-theme='Papirus-Dark'
+cursor-theme='Bibata-Modern-Ice'
+cursor-size=24
+EOF
+ dconf update
+ ) >> "$logfile" 2>&1 || error_warn "$action" "$?"
action="marking dotfile dir as safe.directory" && display "task" "$action"
if git config --global --add safe.directory "$user_archsetup_dir" >> "$logfile" 2>&1; then