Updated GTK 3 settings on Wayland (markdown)

Jonathan Kirszling 2020-12-18 12:00:49 +01:00
parent b79bc0ab80
commit cfb93254ff

@ -36,25 +36,25 @@ If you'd rather have those values picked from your settings.ini file, here is a
```bash ```bash
#!/bin/sh #!/bin/sh
# usage: import-gsettings <gsettings key>:<settings.ini key> <gsettings key>:<settings.ini key> ... # usage: import-gsettings
config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
if [ ! -f "$config" ]; then exit 1; fi
expression="" gnome_schema="org.gnome.desktop.interface"
for pair in "$@"; do gtk_theme="$(grep 'gtk-theme-name' "$config" | cut -d'=' -f2)"
IFS=:; set -- $pair icon_theme="$(grep 'gtk-icon-theme-name' "$config" | cut -d'=' -f2)"
expressions="$expressions -e 's:^$2=(.*)$:gsettings set org.gnome.desktop.interface $1 \1:e'" cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | cut -d'=' -f2)"
done font_name="$(grep 'gtk-font-name' "$config" | cut -d'=' -f2)"
IFS= gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
eval exec sed -E $expressions "${XDG_CONFIG_HOME:-$HOME/.config}"/gtk-3.0/settings.ini >/dev/null gsettings set "$gnome_schema" icon-theme "$icon_theme"
gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
gsettings set "$gnome_schema" font-name "$font_name"
``` ```
Importing the gtk, icon, and cursor themes: Importing the gtk, icon, and cursor themes:
``` ```
exec_always import-gsettings \ exec_always import-gsettings
gtk-theme:gtk-theme-name \
icon-theme:gtk-icon-theme-name \
cursor-theme:gtk-cursor-theme-name\
font-name:gtk-font-name
``` ```
## XSettings ## XSettings