Introduction
Introduction Statistics Contact Development Disclaimer Help
index.md - sites - public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log
Files
Refs
---
index.md (1733B)
---
1 externalpipe
2 ============
3
4 Description
5 -----------
6
7 Pipe the current page's source to an external program. This is particula…
8 helpful for keyboard-based link following and also for viewing the sourc…
9 external editor. Works both when javascript is enabled and disabled.
10
11 Example
12 -------
13 Install the below shell scripts into your `$PATH`:
14 * [surf_linkselect.sh](surf_linkselect.sh) - extracts links via xmllint …
15 pipes to dmenu, converts selected link to valid URL.
16 * [edit_screen.sh](edit_screen.sh) - open source in `$EDITOR` for copyin…
17
18
19 Add to your `config.h`:
20 static char *linkselect_curwin [] = { "/bin/sh", "-c",
21 "surf_linkselect.sh $0 'Link' | xargs -r xprop -id $0 -f…
22 winid, NULL
23 };
24 static char *linkselect_newwin [] = { "/bin/sh", "-c",
25 "surf_linkselect.sh $0 'Link (new window)' | xargs -r su…
26 winid, NULL
27 };
28 static char *editscreen[] = { "/bin/sh", "-c", "edit_screen.sh",…
29 ...
30 static Key keys[] = {
31 { MODKEY, GDK_KEY_d, externalpipe, { .v =…
32 { GDK_SHIFT_MASK|MODKEY, GDK_KEY_d, externalpipe, { .v =…
33 { MODKEY, GDK_KEY_o, externalpipe, { .v =…
34 ...
35 }
36
37 Now you have the new keybindings:
38 - **Ctrl-d** - open dmenu with links, select to follow in current surf w…
39 - **Ctrl-Shift-d** - open dmenu with links, select to open in new surf w…
40 - **Ctrl-o** - view sourcecode for the current page in your editor
41
42
43 Download
44 --------
45
46 * [surf-2.0-externalpipe.diff](surf-2.0-externalpipe.diff) (2379) (20190…
47
48 Author
49 ------
50
51 * Miles Alan - [email protected]
52
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.