]> gitweb.fluxo.info Git - rhatto/dotfiles/gtk.git/commitdiff
Feat: minor revamp master
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 3 Jul 2024 19:59:55 +0000 (16:59 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 3 Jul 2024 19:59:55 +0000 (16:59 -0300)
README.md
config.dot/gtk-3.0/gtk.css.link [new file with mode: 0644]
config.dot/gtk-3.0/settings.ini.link
profile.d.dot/gtk.sh.link [new file with mode: 0755]
xsessionrc.d.dot/gtk.sh.link [new file with mode: 0755]

index ddcf7a0b0e06849ad98ef674f18f4dcfb7be71e9..e5f83f575d82b21c595f7b74375a01619955b6ca 100644 (file)
--- 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
 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 (file)
index 0000000..7689145
--- /dev/null
@@ -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/
+ */
index dc89b0e8704d79a2f0240d6e1437db7aaed98821..60ec012f80555a83d2876691427260921316cae5 100644 (file)
@@ -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]
 [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 (executable)
index 0000000..abf2b4d
--- /dev/null
@@ -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 (executable)
index 0000000..30d5164
--- /dev/null
@@ -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"