[wiki] [sites] wiki updated

From: <hg_AT_suckless.org>
Date: Fri, 4 Jun 2010 10:46:16 +0000 (UTC)

changeset: 537:eaadf4b34005
tag: tip
user: nibble
date: Fri Jun 04 12:47:39 2010 +0200
files: surf.suckless.org/files/bmarks.md
description:
* Update bmarks.md


diff -r 63ffb26f8bad -r eaadf4b34005 surf.suckless.org/files/bmarks.md
--- a/surf.suckless.org/files/bmarks.md Wed Jun 02 18:40:09 2010 -0400
+++ b/surf.suckless.org/files/bmarks.md Fri Jun 04 12:47:39 2010 +0200
_AT_@ -35,15 +35,16 @@
 ----
         #!/bin/sh
         # $1 = $xid
- # $2 = $p = _SURF_FIND _SURF_BMARK _SURF_URI (what SETPROP sets in config.h)
+ # $2 = $p = _SURF_FIND _SURF_BMARK _SURF_URI _SURF_URI_RAW (what SETPROP sets in config.h)
         #
         # // replace default setprop with this one
- # #define SETPROP(p) { .v = (char *[]){ "/bin/sh", "-c", "surf.sh $1 $0", p, winid, NULL } }
+ # #define SETPROP(p) { .v = (char *[]){ "/bin/sh", "-c", "surf.sh $0 $1", winid, p, NULL } }
         #
         # // fix shift+slash keybinding in spanish keyboard (f.example)
- # { MODKEY, GDK_s, spawn, SETPROP("_SURF_FIND") },
- # { MODKEY, GDK_b, spawn, SETPROP("_SURF_BMARK") },
- # { MODKEY|GDK_SHIFT_MASK, GDK_g, spawn, SETPROP("_SURF_URI_RAW") },
+ # { MODKEY, GDK_g, spawn, SETPROP("_SURF_URI") },
+ # { MODKEY|GDK_SHIFT_MASK,GDK_g, spawn, SETPROP("_SURF_URI_RAW") },
+ # { MODKEY, GDK_f, spawn, SETPROP("_SURF_FIND") },
+ # { MODKEY, GDK_b, spawn, SETPROP("_SURF_BMARK") },
 
         font='-*-terminus-medium-*-*-*-*-*-*-*-*-*-*-*'
         normbgcolor='#181818'
_AT_@ -57,7 +58,7 @@
         uri=`xprop -id $xid _SURF_URI | cut -d '"' -f 2`
         kw=`xprop -id $xid _SURF_FIND | cut -d '"' -f 2`
         dmenu="dmenu -e $xid -fn $font -nb $normbgcolor -nf $normfgcolor \
- -sb $selbgcolor -sf $selfgcolor"
+ -sb $selbgcolor -sf $selfgcolor"
 
         s_xprop() {
                 [ -n "$2" ] && xprop -id $xid -f $1 8s -set $1 "$2"
_AT_@ -65,15 +66,15 @@
 
         case "$p" in
         "_SURF_FIND")
- find="`echo $kw | $dmenu -p find:`"
- s_xprop _SURF_FIND "$find"
+ ret="`echo $kw | $dmenu -p find:`"
+ s_xprop _SURF_FIND "$ret"
                 ;;
         "_SURF_BMARK")
                 grep "$uri" $bmarks >/dev/null 2>&1 || echo "$uri" >> $bmarks
                 ;;
         "_SURF_URI_RAW")
- uri=`echo $uri | $dmenu -p "uri:"`
- s_xprop _SURF_URI "$uri"
+ ret=`echo $uri | $dmenu -p "uri:"`
+ s_xprop _SURF_GO "$ret"
                 ;;
         "_SURF_URI")
                 sel=`tac $bmarks 2> /dev/null | $dmenu -p "uri [dgtwy*]:"`
_AT_@ -82,25 +83,25 @@
                 arg=$(echo $sel | cut -d ' ' -f 2-)
                 case "$opt" in
                 "d") # del.icio.us
- uri="http://del.icio.us/save?url=$uri"
+ ret="http://del.icio.us/save?url=$uri"
                         ;;
                 "g") # google for it
- uri="http://www.google.com/search?q=$arg"
+ ret="http://www.google.com/search?q=$arg"
                         ;;
                 "t") # tinyurl
- uri="http://tinyurl.com/create.php?url=$uri"
+ ret="http://tinyurl.com/create.php?url=$uri"
                         ;;
                 "w") # wikipedia
- uri="http://wikipedia.org/wiki/$arg"
+ ret="http://wikipedia.org/wiki/$arg"
                         ;;
                 "y") # youtube
- uri="http://www.youtube.com/results?search_query=$arg&aq=f"
+ ret="http://www.youtube.com/results?search_query=$arg&aq=f"
                         ;;
                 *)
- uri="$sel"
+ ret="$sel"
                         ;;
                 esac
- s_xprop _SURF_URI "$uri"
+ s_xprop _SURF_GO "$ret"
                 ;;
         *)
                 echo Unknown xprop
Received on Fri Jun 04 2010 - 12:46:16 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 19:31:17 CEST