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.

Revisions

  1. jakeogh revised this gist Aug 6, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion suckless surf
    Original file line number Diff line number Diff line change
    @@ -21,4 +21,5 @@ mv /etc/portage/savedconfig/www-client/surf-9999.new /etc/portage/savedconfig/ww

    echo "ok now re-emerge surf"

    # replace is avail @ https://github.com/jakeogh/replace-text
    # replace is avail @ https://github.com/jakeogh/replace-text
    # insert_line_after_match @ https://gist.github.com/jakeogh/ea48748417fec5f170ec
  2. jakeogh revised this gist Aug 6, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions suckless surf
    Original file line number Diff line number Diff line change
    @@ -20,3 +20,5 @@ cat /etc/portage/savedconfig/www-client/surf-9999 | \
    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
  3. jakeogh created this gist Aug 6, 2015.
    22 changes: 22 additions & 0 deletions suckless surf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    #!/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"