aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-07-03 16:59:55 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-07-03 16:59:55 -0300
commit12a3356805a39197fba6b4742a548c0244d5f0f3 (patch)
tree9ae0ec49f34fd6888c93d2e649bb8d0d18ebe991
parent84176e5da79b0688241314f123864db91dac1040 (diff)
downloadgtk-master.tar.gz
gtk-master.tar.bz2
Feat: minor revampHEADmaster
-rw-r--r--README.md35
-rw-r--r--config.dot/gtk-3.0/gtk.css.link8
-rw-r--r--config.dot/gtk-3.0/settings.ini.link48
-rwxr-xr-xprofile.d.dot/gtk.sh.link25
-rwxr-xr-xxsessionrc.d.dot/gtk.sh.link22
5 files changed, 114 insertions, 24 deletions
diff --git a/README.md b/README.md
index ddcf7a0..e5f83f5 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,34 @@
-Rhatto's gtk dotfiles
-=====================
+# Rhatto's GTK dotfiles
-This is the repository for rhatto's gtk configuration.
+## About
+
+This is the repository for rhatto's GTK configuration.
More information at https://git.fluxo.info/metadot
+
+## Changing theme configuration
+
+* Just edit the files.
+
+## Applying the configuration
+
+* Restart each affected application.
+
+## Tinkering
+
+* There's a built-in `gsettings_reload_interface` function from
+ prototype at [gtk.sh](profile.d.dot/gtk.sh.link).
+
+* You might also be tempted to use [lxappearance][], but this can break the
+ dotfiles' symlinks for the GTK configuration.
+
+* Another option to be tested is adding these options as [XSETTINGS][]
+ and rely on a manager such as [xsettingsd][].
+
+[XSETTINGS]: https://www.freedesktop.org/wiki/Specifications/xsettings-spec/
+[lxappearance]: https://tracker.debian.org/pkg/lxappearance
+[xsettingsd]: https://github.com/derat/xsettingsd
+
+## References
+
+* [GTK - ArchWiki](https://wiki.archlinux.org/title/GTK)
+* [Apps/DconfEditor - GNOME Wiki!](https://wiki.gnome.org/Apps/DconfEditor)
diff --git a/config.dot/gtk-3.0/gtk.css.link b/config.dot/gtk-3.0/gtk.css.link
new file mode 100644
index 0000000..7689145
--- /dev/null
+++ b/config.dot/gtk-3.0/gtk.css.link
@@ -0,0 +1,8 @@
+/**
+ * Custom CSS settings for GTK.
+ * Check https://wiki.archlinux.org/title/GTK
+ * https://docs.gtk.org/gtk3/css-overview.html
+ * https://docs.gtk.org/gtk3/css-properties.html
+ * https://developer.gnome.org/documentation/tools/inspector.html
+ * https://blogs.gnome.org/mclasen/2014/05/06/tweaking-a-the-gtk-theme-using-css/
+ */
diff --git a/config.dot/gtk-3.0/settings.ini.link b/config.dot/gtk-3.0/settings.ini.link
index dc89b0e..60ec012 100644
--- a/config.dot/gtk-3.0/settings.ini.link
+++ b/config.dot/gtk-3.0/settings.ini.link
@@ -1,22 +1,28 @@
+# GTK 3 settings
+#
+# For the complete list of settings, check
+# https://docs.gtk.org/gtk3/class.Settings.html
+#
+# Example:
+#
+# gtk-theme-name = Adwaita
+# gtk-fallback-icon-theme = gnome
+# gtk-icon-theme-name = Gnome
+# gtk-font-name = [font name] [font size]
+# gtk-theme-name = Materia-dark-compact
+# gtk-icon-theme-name = hicolor
+#
+
+# Custom settings
[Settings]
-gtk-application-prefer-dark-theme=true
-#gtk-theme-name = Adwaita
-#gtk-fallback-icon-theme = gnome
-#gtk-icon-theme-name = Gnome
-#gtk-font-name = [font name] [font size]
-#gtk-theme-name=Materia-dark-compact
-gtk-theme-name=Blackbird
-#gtk-icon-theme-name=hicolor
-gtk-icon-theme-name=Obsidian
-gtk-font-name=Sans 10
-gtk-cursor-theme-name=Adwaita
-gtk-cursor-theme-size=0
-gtk-toolbar-style=GTK_TOOLBAR_BOTH
-gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
-gtk-button-images=1
-gtk-menu-images=1
-gtk-enable-event-sounds=0
-gtk-enable-input-feedback-sounds=0
-gtk-xft-antialias=1
-gtk-xft-hinting=1
-gtk-xft-hintstyle=hintmedium
+gtk-application-prefer-dark-theme = true
+gtk-theme-name = Blackbird
+gtk-icon-theme-name = Obsidian
+gtk-font-name = Sans 10
+gtk-cursor-theme-name = Adwaita
+gtk-cursor-theme-size = 0
+gtk-enable-event-sounds = 0
+gtk-enable-input-feedback-sounds = 0
+gtk-xft-antialias = 1
+gtk-xft-hinting = 1
+gtk-xft-hintstyle = hintmedium
diff --git a/profile.d.dot/gtk.sh.link b/profile.d.dot/gtk.sh.link
new file mode 100755
index 0000000..abf2b4d
--- /dev/null
+++ b/profile.d.dot/gtk.sh.link
@@ -0,0 +1,25 @@
+#
+# GTK script functionality
+#
+
+# Reload org.gnome.desktop.interface settings
+# Inspired by https://askubuntu.com/questions/151513/reload-gtk-3-0-theme/1110354#1110354
+#
+# Check also https://wiki.gnome.org/HowDoI/GSettings
+#gsettings_reload_interface() {
+# # Reset
+# for setting in `$gtk_settings`; do
+# gsettings set org.gnome.desktop.interface $setting ''
+# done
+#
+# # Wait a bit
+# sleep 1
+#
+# # Apply settings
+# for setting in $gtk_settings; do
+# value="$(gsettings get org.gnome.desktop.interface $setting)"
+#
+# echo "Reloading setting $setting ($value)..."
+# gsettings set org.gnome.desktop.interface $setting $value
+# done
+#}
diff --git a/xsessionrc.d.dot/gtk.sh.link b/xsessionrc.d.dot/gtk.sh.link
new file mode 100755
index 0000000..30d5164
--- /dev/null
+++ b/xsessionrc.d.dot/gtk.sh.link
@@ -0,0 +1,22 @@
+#
+# GTK X session functionality
+#
+
+# Set the GTK theme
+#
+# This is an alternative way to set the theme other than using XSETTINGS or
+# using $XDG_CONFIG_HOME/gtk-3.0/settings.ini
+#
+# Check https://wiki.archlinux.org/title/GTK
+#GTK_THEME=Blackbird
+
+# Make QT applications to use GTK styles
+#
+# Check https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications
+# https://wiki.archlinux.org/title/Qt
+# https://doc.qt.io/qt-6/qpa.html
+# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983536
+#
+# Check also the xnm-tray script at the https://git.fluxo.info/utils-x11
+#export XDG_CURRENT_DESKTOP="GNOME"
+#export QT_QPA_PLATFORMTHEME="gnome"