You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,8 +24,8 @@ For each configuration line specify:
24
24
25
25
- The menu text for the entry (will be shown when you right-click)
26
26
- The NM host to use. Use **`runwith`** unless you know what you're doing.
27
-
- The context in which you want the menu entry to appear (link, selection, image)
28
-
- The actual command you want to run. **Separate words using commas**. Use the following special words to indicate the current link, selected text or image URL respectively: **`%%LINK%%`**, **`%%SELECTION%%`**, **`%%IMAGE%%`** (only the one appropriate for the context). At runtime, the **`%%WORD%%`** will be replaced with the actual link, selection or image URL value.
27
+
- The context in which you want the menu entry to appear: `link`, `selection`, `image`, `page`. `page` applies when none of the more-specific ones does.
28
+
- The actual command you want to run. **Separate words using commas**. Use the following special words to indicate the current link, selected text or image URL respectively: **`%%LINK%%`**, **`%%SELECTION%%`**, **`%%IMAGE%%`** (only the one appropriate for the context). At runtime, the **`%%WORD%%`** will be replaced with the actual link, selection or image URL value. Additionally, the **`%%TAB-URL%%`** and **`TAB-TITLE`** keywords are available in all contexts, and contain, as their name implies, the current tab's URL and title.
29
29
- Whether to run the command through a shell. This is normally needed only if you have special shell characters in the command (redirections, pipes, etc), and shouldn't be normally required.
30
30
- Whether you want the NM host program to wait for the command to finish or not. Unless you want to run graphical or detached commands, you should check this field.
31
31
@@ -96,6 +96,20 @@ Save the following in `/tmp/config.json` and import it in RunWith configuration:
96
96
],
97
97
"shell": false,
98
98
"wait": true
99
+
},
100
+
{
101
+
"id": "3",
102
+
"title": "Simple page command",
103
+
"nmhost": "runwith",
104
+
"contexts": [
105
+
"page"
106
+
],
107
+
"action": [
108
+
"/tmp/test.sh",
109
+
"%%TAB-TITLE%%"
110
+
],
111
+
"shell": false,
112
+
"wait": true
99
113
}
100
114
]
101
115
}
@@ -104,7 +118,7 @@ Save the following in `/tmp/config.json` and import it in RunWith configuration:
104
118
105
119
After importing, save the configuration.
106
120
107
-
Now go to a webpage, right-click on a link, selection or image, and you should see the corresponding RunWith menu entry. If you run it, you will see our `/tmp/test.sh` being run and writing its output to `/tmp/output.txt`. Of course this is just a silly example.
121
+
Now go to a webpage, right-click on a link, selection or image (or on any point in the page), and you should see the corresponding RunWith menu entry. If you run it, you will see our `/tmp/test.sh` being run and writing its output to `/tmp/output.txt`. Of course this is just a silly example.
0 commit comments