blob: 3adecb290a878b2efed230af651d469f37a3dfa7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/bash
# credit:
# http://tacticalvim.wordpress.com/2013/01/05/using-the-adwaita-gtk3-theme-with-xfce-and-lightdm/
GR_FILE="/usr/share/themes/Adwaita/gtk-3.0/gtk.gresource"
GR_BASEDIR="$(dirname "${GR_FILE}")"
GR_BASEROOT="/org/gnome/adwaita/"
GR_FILES="${GR_BASEDIR}/files"
mkdir "${GR_FILES}"
pushd "${GR_FILES}" >/dev/null || exit
for RSRC in $(gresource list $GR_FILE); do
RSRC_FILE="$(echo "${RSRC#$GR_BASEROOT}")"
mkdir -p "$(dirname "$RSRC_FILE")" ||:
gresource extract "$GR_FILE" "$RSRC" > "$RSRC_FILE"
done
find "${GR_BASEDIR}" -maxdepth 1 -name '*.css' -print0 | xargs -0 -I '{}' \
sed -i.bck \
-e "s|^\(@import\s\+url\s*(\s*\"\)resource://${GR_BASEROOT}\(.*\)|\1file:///${GR_FILES}/\2|" \
'{}'
popd >/dev/null
|