From 0af8bb15c0809018bbae321d0683b50c6aa3740b Mon Sep 17 00:00:00 2001 From: Logan G Date: Thu, 5 Oct 2023 02:48:49 -0600 Subject: [PATCH] Added fix for inconsistent GTK theming --- airootfs/etc/skel/.config/labwc/autostart | 3 +++ airootfs/usr/local/bin/import-gsettings | 15 +++++++++++++++ profiledef.sh | 1 + 3 files changed, 19 insertions(+) create mode 100755 airootfs/usr/local/bin/import-gsettings diff --git a/airootfs/etc/skel/.config/labwc/autostart b/airootfs/etc/skel/.config/labwc/autostart index a386c57..fe60301 100644 --- a/airootfs/etc/skel/.config/labwc/autostart +++ b/airootfs/etc/skel/.config/labwc/autostart @@ -23,3 +23,6 @@ waybar -c ~/.config/waybar/labwc >/dev/null 2>&1 & # Drawer nwggrid-server 2>&1 & + +# Import GTK settings +import-gsettings diff --git a/airootfs/usr/local/bin/import-gsettings b/airootfs/usr/local/bin/import-gsettings new file mode 100755 index 0000000..967620f --- /dev/null +++ b/airootfs/usr/local/bin/import-gsettings @@ -0,0 +1,15 @@ +#!/bin/sh + +# usage: import-gsettings +config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini" +if [ ! -f "$config" ]; then exit 1; fi + +gnome_schema="org.gnome.desktop.interface" +gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')" +icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')" +cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')" +font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')" +gsettings set "$gnome_schema" gtk-theme "$gtk_theme" +gsettings set "$gnome_schema" icon-theme "$icon_theme" +gsettings set "$gnome_schema" cursor-theme "$cursor_theme" +gsettings set "$gnome_schema" font-name "$font_name" diff --git a/profiledef.sh b/profiledef.sh index 525271e..668701e 100644 --- a/profiledef.sh +++ b/profiledef.sh @@ -25,4 +25,5 @@ file_permissions=( ["/usr/local/bin/choose-mirror"]="0:0:755" ["/usr/local/bin/Installation_guide"]="0:0:755" ["/usr/local/bin/livecd-sound"]="0:0:755" + ["/usr/local/bin/import-gsettings"]="0:0:755" )