summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2013-04-11 19:11:33 +0200
committerJan Pokorný <jpokorny@redhat.com>2013-04-11 19:12:38 +0200
commited587b4b935f8956407df4f718ebf6a35daafaa3 (patch)
tree5c5a770b2f66071838262fc09e17e99c5a568c8f /scripts
parent23297186eb781079c4bf576e6563b62ec6fd9a16 (diff)
Adjust gkt-3.0 theme customization incl. script for automation
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gtk3/adwaita-settingini.sh16
-rwxr-xr-xscripts/gtk3/gtk3-fix.sh (renamed from scripts/gtk3-fix.sh)2
2 files changed, 18 insertions, 0 deletions
diff --git a/scripts/gtk3/adwaita-settingini.sh b/scripts/gtk3/adwaita-settingini.sh
new file mode 100755
index 0000000..d79bd3e
--- /dev/null
+++ b/scripts/gtk3/adwaita-settingini.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# jpokorny@redhat.com
+
+# this is recipe to prepare ~/.config/gtk-3.0/settings.ini
+# for Adwaita theme black as suitable for me and as also
+# statically placed within this dotfiles repo
+
+ADWAITA_GTK3=/usr/share/themes/Adwaita/gtk-3.0
+FG_COLOR='#cccccc'
+TOOLTIP_FG_COLOR='#eeeeec'
+
+sed "${ADWAITA_GTK3}/settings.ini" \
+ -e "s|^\(\s*gtk-color-scheme\s\+=.*\\\\nfg_color:\)[^;\\]\+\([;\\].*\)$|\1${FG_COLOR}\2|" \
+ -e "s|^\(\s*gtk-color-scheme\s\+=.*\\\\ntooltip_fg_color:\)[^;\\]\+\([;\\].*\)$|\1${TOOLTIP_FG_COLOR}\2|" \
+ > ../../.config/gtk-3.0/settings.ini
diff --git a/scripts/gtk3-fix.sh b/scripts/gtk3/gtk3-fix.sh
index 3adecb2..acc55b1 100755
--- a/scripts/gtk3-fix.sh
+++ b/scripts/gtk3/gtk3-fix.sh
@@ -1,6 +1,8 @@
#!/bin/bash
# credit:
# http://tacticalvim.wordpress.com/2013/01/05/using-the-adwaita-gtk3-theme-with-xfce-and-lightdm/
+#
+# to be run as root, not user related
GR_FILE="/usr/share/themes/Adwaita/gtk-3.0/gtk.gresource"
GR_BASEDIR="$(dirname "${GR_FILE}")"