index.md (753B)
1 Edit source 2 =========== 3 4 Description 5 ----------- 6 7 This script named say editurl allows the user to edit the source of the current page without fetching the page again 8 in three keystrokes: 9 10 #!/bin/sh 11 dir=~/.surf/tmpedit 12 name=`ls $dir | wc -l` 13 file=$dir/$name.html 14 sselp > $file && urxvtc -e vi $file 15 16 To launch it, you can add the following in config.h above the line "static Key keys[] = {" : 17 18 #define EDIT { .v = (char *[]){ "/bin/sh", "-c", "editurl", NULL } } 19 20 and the following in the "static Key keys[] = {" part 21 22 { MODKEY, GDK_e, spawn, EDIT }, 23 24 The three required keystrokes are : 25 * modkey o 26 * modkey a 27 * modkey e 28 29 30 Author 31 ------ 32 33 - Julien Steinhauser <julien.steinhauser@orange.fr>