chezmoi/dot_config/sway/scripts/executable_import-gsettings
kjuulh 9d6cc15469
Add .config/sway/cheatsheet
Add .config/sway/config
Add .config/sway/config.d/application_defaults
Add .config/sway/config.d/autostart_applications
Add .config/sway/config.d/clamshell
Add .config/sway/config.d/default
Add .config/sway/config.d/input
Add .config/sway/config.d/output
Add .config/sway/config.d/theme
Add .config/sway/keyboard.conf
Add .config/sway/scripts/clamshell.sh
Add .config/sway/scripts/import-gsettings
Add .config/sway/scripts/lockman.sh
Add .config/sway/scripts/screenshot.sh
Add .config/sway/scripts/swayfader.py
Add .config/sway/scripts/weather.sh
Add .config/sway/sway.png
Add .config/sway/swaylock.png
2023-07-25 15:39:26 +02:00

16 lines
671 B
Bash

#!/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" | cut -d'=' -f2)"
icon_theme="$(grep 'gtk-icon-theme-name' "$config" | cut -d'=' -f2)"
cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | cut -d'=' -f2)"
font_name="$(grep 'gtk-font-name' "$config" | cut -d'=' -f2)"
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"