diff --git a/sway/config b/sway/config index a6e76fd..8c15199 100644 --- a/sway/config +++ b/sway/config @@ -250,6 +250,13 @@ bindsym $mod+r mode "resize" bindsym XF86MonBrightnessUp exec brightnessctl set +5% +# GTK 3 settings +# See https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland for more info. + +exec_always ~/.config/sway/import-gsettings \ + gtk-theme:gtk-theme-name \ + icon-theme:gtk-icon-theme-name \ + cursor-theme:gtk-cursor-theme-name # # Status Bar: diff --git a/sway/import_gsetting b/sway/import_gsetting new file mode 100755 index 0000000..93fb35c --- /dev/null +++ b/sway/import_gsetting @@ -0,0 +1,11 @@ +#! /bin/sh +# Lifted from https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland +# usage: import-gsettings : : ... + +expression="" +for pair in "$@"; do + IFS=:; set -- $pair + expressions="$expressions -e 's:^$2=(.*)$:gsettings set org.gnome.desktop.interface $1 \1:e'" +done +IFS= +eval exec sed -E $expressions "${XDG_CONFIG_HOME:-$HOME/.config}"/gtk-3.0/settings.ini >/dev/null \ No newline at end of file