Skip to content

Instantly share code, notes, and snippets.

@jakeogh
Last active August 29, 2015 14:26
Show Gist options
  • Save jakeogh/b23aac080c5c74310c88 to your computer and use it in GitHub Desktop.
Save jakeogh/b23aac080c5c74310c88 to your computer and use it in GitHub Desktop.
#!/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