Skip to content

Instantly share code, notes, and snippets.

@barrosfelipe
Forked from jakeogh/suckless surf
Last active August 29, 2015 14:26
Embed
What would you like to do?
#!/bin/sh
#https://github.com/TrilbyWhite/interrobang
#https://github.com/TrilbyWhite/swifer
#https://bbs.archlinux.org/viewtopic.php?id=167804
#https://github.com/sschober/surf-scripts.git
timestamp=`date +%s`
cat /etc/portage/savedconfig/www-client/surf-9999 | \
/home/user/cfg/text/replace "static Bool enablespatialbrowsing = TRUE;" "static Bool enablespatialbrowsing = FALSE;" | \
/home/user/cfg/text/replace "static Bool enablediskcache = TRUE;" "static Bool enablediskcache = FALSE;" | \
/home/user/cfg/text/replace "static Bool enableplugins = TRUE;" "static Bool enableplugins = FALSE;" | \
/home/user/cfg/text/replace "static Bool enablescripts = TRUE;" "static Bool enablescripts = FALSE;" | \
/home/user/cfg/text/replace "static Bool allowgeolocation = TRUE;" "static Bool allowgeolocation = FALSE;" | \
/home/user/cfg/text/replace "{ MODKEY, GDK_y, clipboard, { .b = FALSE } }," "{ MODKEY, GDK_c, clipboard, { .b = FALSE } }," | \
/home/user/cfg/text/insert_line_after_match " { MODKEY, GDK_h, navigate, { .i = -1 } }," " { MODKEY, GDK_BackSpace, navigate, { .i = -1 } }," > /etc/portage/savedconfig/www-client/surf-9999.new || exit 1
mv /etc/portage/savedconfig/www-client/surf-9999.new /etc/portage/savedconfig/www-client/surf-9999
echo "ok now re-emerge surf"
# replace is avail @ https://github.com/jakeogh/replace-text
# insert_line_after_match @ https://gist.github.com/jakeogh/ea48748417fec5f170ec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment