logo

badwolf

minimalist and privacy-oriented web browser based on WebKitGTK git clone https://hacktivis.me/git/badwolf.git
commit: 96676069aaaea036dccb73f992852358a65bca47
parent e64d606e233e320d8df20958ee9e964fd95dca6a
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun,  3 May 2020 02:24:04 +0200

Add a logo

Diffstat:

MMakefile15++++++++++++++-
MREADME.md2++
Mbadwolf.c1+
Abadwolf.svg117+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aicons/hicolor/128x128/apps/badwolf.png0
Aicons/hicolor/256x256/apps/badwolf.png0
Aicons/hicolor/48x48/apps/badwolf.png0
Aicons/hicolor/64x64/apps/badwolf.png0
Aicons/hicolor/scalable/apps/badwolf.svg2++
Aicons_size.sh4++++
Mkeybindings.c1+
11 files changed, 141 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -20,6 +20,9 @@ DBG ?= PKGCONFIG ?= pkg-config MSGFMT ?= msgfmt +# for i in 48 64 128 256; do echo icons/hicolor/${i}x${i}/apps/badwolf.png; done | tr '\n' ' ' +ICON_SIZES = icons/hicolor/48x48/apps/badwolf.png icons/hicolor/64x64/apps/badwolf.png icons/hicolor/128x128/apps/badwolf.png icons/hicolor/256x256/apps/badwolf.png + DEPS = gtk+-3.0 webkit2gtk-4.0 libsoup-2.4 SRCS = uri.c uri_test.c keybindings.c badwolf.c OBJS = uri.o keybindings.o badwolf.o @@ -33,7 +36,15 @@ CDEPS = -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\" -D_POSIX_C_SOURCE=2008 CDEPS += `$(PKGCONFIG) --cflags $(DEPS)` LIBS = `$(PKGCONFIG) --libs $(DEPS)` -all: $(EXE) $(TRANS) po/messages.pot +all: $(EXE) $(ICON_SIZES) $(TRANS) po/messages.pot + +icons/hicolor/scalable/apps/badwolf.svg: badwolf.svg + mkdir -p icons/hicolor/scalable/apps + scour --no-line-breaks --enable-id-stripping --remove-metadata $< $@ + +icons/hicolor/%/apps/badwolf.png: icons/hicolor/scalable/apps/badwolf.svg + mkdir -p `dirname $@` + rsvg-convert -a `echo $@ | cut -d/ -f3 | ./icons_size.sh` $< -o $@ po/messages.pot: $(SRCS) xgettext --keyword=_ --language=C --from-code=UTF-8 -o $@ --add-comments --sort-output --copyright-holder="Badwolf Authors <https://hacktivis.me/projects/badwolf>" --package-name="$(PACKAGE)" --package-version="$(VERSION_FULL)" --msgid-bugs-address="contact+badwolf-msgid@hacktivis.me" $(SRCS) @@ -74,6 +85,8 @@ install: all cp -p badwolf.desktop $(DESTDIR)$(APPSDIR)/ mkdir -p $(DESTDIR)$(DOCDIR) cp -p $(DOCS) $(DESTDIR)$(DOCDIR)/ + mkdir -p $(DESTDIR)$(PREFIX)/share + cp -r icons $(DESTDIR)$(PREFIX)/share/ @printf '\nNote: An example AppArmor profile has been installed at '$(DOCDIR)/usr.bin.badwolf'\n' .PHONY: clean diff --git a/README.md b/README.md @@ -56,5 +56,7 @@ Dependencies are: Compilation is done with `make CC=${CC:-cc}`, install with `make install`. An example AppArmor profile is provided at `usr.bin.badwolf`, please do runtime checks before deploying. +You'll also need `rsvg-convert(1)` (from librsvg) and scour if you want to regenerate the icons, for example after modifying them or adding a new size. These aren't needed for normal installation as it is bundled. + ## Notes Most of the privacy/security stuff will be done with patches against WebKit as quite a lot isn’t into [WebKitSettings](https://webkitgtk.org/reference/webkit2gtk/stable/WebKitSettings.html) and with generic WebKit extensions that should be resuseable. diff --git a/badwolf.c b/badwolf.c @@ -790,6 +790,7 @@ main(int argc, char *argv[]) gtk_window_set_default_size( GTK_WINDOW(window->main_window), BADWOLF_DEFAULT_WIDTH, BADWOLF_DEFAULT_HEIGHT); gtk_window_set_role(GTK_WINDOW(window->main_window), "browser"); + gtk_window_set_icon_name(GTK_WINDOW(window->main_window), "badwolf"); GtkCssProvider *css_provider_app = gtk_css_provider_new(); gchar *provider_path_app = g_build_filename(DATADIR, "interface.css", NULL); diff --git a/badwolf.svg b/badwolf.svg @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="64" + height="64" + version="1.1" + viewBox="0 0 16.93333 16.93333" + id="svg17" + sodipodi:docname="badwolf.svg" + inkscape:version="1.0rc1 (09960d6f05, 2020-04-09)"> + <metadata + id="metadata21"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + inkscape:document-rotation="0" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1062" + id="namedview19" + showgrid="false" + inkscape:zoom="5.9765625" + inkscape:cx="-5.8562093" + inkscape:cy="32" + inkscape:window-x="0" + inkscape:window-y="18" + inkscape:window-maximized="0" + inkscape:current-layer="g16" /> + <defs + id="defs9"> + <clipPath + id="clippy"> + <rect + id="rect4" + width="16.933333" + height="16.933333" + x="0" + y="0" + ry="1" /> + </clipPath> + <linearGradient + id="a"> + <stop + stop-color="#139e7c" + offset="0" + id="stop2" /> + <stop + stop-color="#122548" + offset="1" + id="stop4" /> + </linearGradient> + <radialGradient + id="b" + cx="8.476262" + cy="-1.846706" + r="8.466667" + gradientTransform="matrix(-2.612 .05608289 -.03812291 -1.775534 30.49128 -9.106413)" + gradientUnits="userSpaceOnUse" + xlink:href="#a" /> + <linearGradient + id="c" + x1="9.152693" + x2="6.026362" + y1="9.051465" + y2="13.79657" + gradientTransform="matrix(1.340793,0,0,1.340793,-5.009645,-4.9950368)" + gradientUnits="userSpaceOnUse" + xlink:href="#a" /> + </defs> + <g + id="g16" + clip-path="url(#clippy)"> + <rect + width="16.93333" + height="16.93333" + ry="0" + fill="url(#b)" + id="rect11" /> + <path + inkscape:connector-curvature="0" + d="m 21.86801,-1.9920238 a 13.40211,8.185254 0 0 1 -6.713234,7.092927 13.40211,8.185254 0 0 1 -13.41427,-0.012891 13.40211,8.185254 0 0 1 -6.676652,-7.105795 l 13.40204,0.025759 z" + stroke="#47b79f" + stroke-width="0.264583" + id="path13" /> + <path + inkscape:connector-curvature="0" + d="M 5.954321,19.118114 C 6.279375,16.458717 6.8910042,15.96845 5.7885535,13.873872 5.195892,12.824843 3.5059475,11.558594 2.6479315,10.539665 2.1673827,9.7904655 1.0434685,9.2171762 0.3615065,7.7493392 0.201822,6.7648665 2.5855305,8.9732112 3.2563495,8.9366162 3.5137348,8.6517205 1.6556185,6.7595682 1.8277525,6.0733512 1.97089,5.5027309 2.0400037,4.9353402 2.6089912,4.5036212 c 1.197317,-0.3311996 3.39131,2.812714 4.927271,3.260379 2.110609,-0.7248708 3.1742058,1.490123 4.8202378,1.830078 1.322712,0.1565739 3.207405,1.5936848 4.252409,2.9707628 -0.845016,0.590474 -3.044526,-0.706301 -4.410436,-0.108108 -0.538115,0.825242 1.099559,5.219231 1.386259,5.733128" + fill="#0f0805" + fill-rule="evenodd" + stroke="url(#c)" + stroke-width="0.569064" + style="mix-blend-mode:luminosity;stroke:url(#c)" + id="path15" /> + </g> +</svg> diff --git a/icons/hicolor/128x128/apps/badwolf.png b/icons/hicolor/128x128/apps/badwolf.png Binary files differ. diff --git a/icons/hicolor/256x256/apps/badwolf.png b/icons/hicolor/256x256/apps/badwolf.png Binary files differ. diff --git a/icons/hicolor/48x48/apps/badwolf.png b/icons/hicolor/48x48/apps/badwolf.png Binary files differ. diff --git a/icons/hicolor/64x64/apps/badwolf.png b/icons/hicolor/64x64/apps/badwolf.png Binary files differ. diff --git a/icons/hicolor/scalable/apps/badwolf.svg b/icons/hicolor/scalable/apps/badwolf.svg @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="64" height="64" version="1.1" viewBox="0 0 16.933 16.933" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><clipPath id="clippy"><rect width="16.933" height="16.933" ry="1"/></clipPath><linearGradient id="a"><stop stop-color="#139e7c" offset="0"/><stop stop-color="#122548" offset="1"/></linearGradient><radialGradient id="b" cx="8.4763" cy="-1.8467" r="8.4667" gradientTransform="matrix(-2.612 .056083 -.038123 -1.7755 30.491 -9.1064)" gradientUnits="userSpaceOnUse" xlink:href="#a"/><linearGradient id="c" x1="9.1527" x2="6.0264" y1="9.0515" y2="13.797" gradientTransform="matrix(1.3408 0 0 1.3408 -5.0096 -4.995)" gradientUnits="userSpaceOnUse" xlink:href="#a"/></defs><g clip-path="url(#clippy)"><rect width="16.933" height="16.933" ry="0" fill="url(#b)"/><path d="m21.868-1.992a13.402 8.1853 0 0 1-6.7132 7.0929 13.402 8.1853 0 0 1-13.414-0.012891 13.402 8.1853 0 0 1-6.6767-7.1058l13.402 0.025759z" stroke="#47b79f" stroke-width=".26458"/><path d="m5.9543 19.118c0.32505-2.6594 0.93668-3.1497-0.16577-5.2442-0.59266-1.049-2.2826-2.3153-3.1406-3.3342-0.48055-0.7492-1.6045-1.3225-2.2864-2.7903-0.15968-0.98447 2.224 1.2239 2.8948 1.1873 0.25739-0.2849-1.6007-2.177-1.4286-2.8633 0.14314-0.57062 0.21225-1.138 0.78124-1.5697 1.1973-0.3312 3.3913 2.8127 4.9273 3.2604 2.1106-0.72487 3.1742 1.4901 4.8202 1.8301 1.3227 0.15657 3.2074 1.5937 4.2524 2.9708-0.84502 0.59047-3.0445-0.7063-4.4104-0.10811-0.53812 0.82524 1.0996 5.2192 1.3863 5.7331" fill="#0f0805" fill-rule="evenodd" stroke="url(#c)" stroke-width=".56906" style="mix-blend-mode:luminosity"/></g></svg> diff --git a/icons_size.sh b/icons_size.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# Transforms an icon size from the Icon Theme Specification to rsvg-convert(1) options +#sed -r -e 's;^([^x]*)x([^@]*)$;-w \1 -h \2;' -e 's;^([^x]*)x([^@]*)@(.*)$;-w \1 -h \2 -z \3;' +sed -r 's;^([^x]*)x([^@]*)$;-w \1 -h \2;' diff --git a/keybindings.c b/keybindings.c @@ -46,6 +46,7 @@ badwolf_about_dialog(GtkWindow *main_window, gpointer user_data) gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about_dialog), homepage); gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about_dialog), comments); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about_dialog), version); + gtk_about_dialog_set_logo_icon_name(GTK_ABOUT_DIALOG(about_dialog), "badwolf"); g_signal_connect(about_dialog, "activate-link", G_CALLBACK(about_dialogCb_activate_link), window);