sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit dae8f936af5e546f967d1c8a49c2ada0eb0176f0
parent c3c1d70f0400bfd1894b079d61a4d008a71ffc4c
Author: x@eol.org <unknown>
Date:   Thu, 29 Oct 2009 10:45:25 +0100

added surf.suckless.org/files/edit_source.md
Diffstat:
Asurf.suckless.org/files/edit_source.md | 33+++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+), 0 deletions(-)

diff --git a/surf.suckless.org/files/edit_source.md b/surf.suckless.org/files/edit_source.md @@ -0,0 +1,33 @@ +EDIT SOURCE +=========== + +Description +----------- + +This script named say editurl allows the user to edit the source of the current page without fetching the page again +in three keystrokes: + + #!/bin/sh + dir=~/.surf/tmpedit + name=`ls $dir | wc -l` + file=$dir/$name.html + sselp > $file && urxvtc -e vi $file + +To launch it, you can add the following in config.h above the line "static Key keys[] = {" : + + #define EDIT { .v = (char *[]){ "/bin/sh", "-c", "editurl", NULL } } + +and the following in the "static Key keys[] = {" part + + { MODKEY, GDK_e, spawn, EDIT }, + +The three required keystrokes are : +modkey o +modkey a +modkey e + + +Author +------ + +- Julien Steinhauser <[julien.steinhauser@orange.fr](mailto:julien.steinhauser@orange.fr)>