aboutsummaryrefslogtreecommitdiff
path: root/326
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2025-09-28 20:26:15 +0200
committerRodrigo <rodarima@gmail.com>2025-09-28 23:10:55 +0200
commitfb510ea86be5ceb9e91573890242581fdbd77ad8 (patch)
treed819fe40683592008d136727f5a0b03e48dc1164 /326
Initial versionHEADmain
Diffstat (limited to '326')
-rw-r--r--326/index.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/326/index.md b/326/index.md
new file mode 100644
index 0000000..ce6a890
--- /dev/null
+++ b/326/index.md
@@ -0,0 +1,20 @@
+Title: Add support for user actions in the link menu
+Author: rodarima
+Created: Tue, 17 Dec 2024 21:48:21 +0000
+State: closed
+
+Allows the user to define additional entries in the link menu which will
+execute the given program/script. Each actions is defined using the
+"link_action" option. The link URL is stored in the $url enviroment
+variable and the current page in $origin, so the user can customize how
+do the handling.
+
+Here is a simple example to add three new entries:
+
+ link_action="Debug variables:echo url=$url origin=$origin"
+ link_action="Open in MPV:mpv $url"
+ link_action="Open in Firefox:firefox $url"
+
+The command is spawned in a forked process using the system() call,
+which uses the shell to expand any variable. In particular, the $url
+variable is set to the current URL being opened.