diff options
author | grizzlyuser <grizzlyuser@protonmail.com> | 2020-12-30 21:36:08 +0200 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2021-01-12 00:47:06 -0500 |
commit | 396b6e8f5de478001aefb76fc4b8a6706bc5e9e2 (patch) | |
tree | 6694e3b6973c34c6d438c7a9492f3dc5b978553f /libre/iceweasel | |
parent | 75a7904752fda9260fb0c362cfb18922c27f0229 (diff) | |
download | abslibre-396b6e8f5de478001aefb76fc4b8a6706bc5e9e2.tar.gz abslibre-396b6e8f5de478001aefb76fc4b8a6706bc5e9e2.tar.bz2 abslibre-396b6e8f5de478001aefb76fc4b8a6706bc5e9e2.zip |
libre/iceweasel: process icons for top sites
Remove bundled icons of all websites except Wikipedia. Generate icons
and thumbnails for top sites configured by Parabola from SVG sources
from the branding package.
They need to be displayed on new tab. If not added, thumbnails will be
automatically generated for each website by completely loading it in
background and making a screenshot at start of each browser session.
This network communication can be unwanted for those on pay-per-byte
data plans.
Diffstat (limited to 'libre/iceweasel')
-rw-r--r-- | libre/iceweasel/PKGBUILD | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libre/iceweasel/PKGBUILD b/libre/iceweasel/PKGBUILD index 1f0960d57..84542ba6f 100644 --- a/libre/iceweasel/PKGBUILD +++ b/libre/iceweasel/PKGBUILD @@ -286,6 +286,27 @@ END -o "${brandingdestdir}/default$i.png" done + # process default Top Sites and their icons + local tippytopdir=browser/components/newtab/data/content/tippytop + find "${tippytopdir}" -type f \ + -not -name 'wikipedia-org*' \ + -not -name 'top_sites.json' \ + -exec rm -v {} \; + for image in "${brandingsrcdir}"/tippytop/*.svg; do + local outname=$(basename -s .svg "${image}") + + local size=$(identify -format '%wx%h' "${tippytopdir}"/images/wikipedia-org@2x.png) + magick -density 300 $image -gravity center -resize $size -extent $size \ + "${tippytopdir}/images/${outname}@2x.png" + + local background='none' + if [[ $outname == 'gnu' ]]; then background='white'; fi + size=256x256 + magick -density 300 -background $background $image -gravity center \ + -resize $size -extent $size -define icon:auto-resize=64,48,32,16 \ + "${tippytopdir}/favicons/${outname}.ico" + done + # apply branding patches export QUILT_PATCHES="${brandingsrcdir}"/patches export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index' |