Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow actions to be defined to handle URLs #199

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rodarima
Copy link
Member

Implements the logic to read rules from ~/.dillo/rulesrc which define custom actions to handle a URL. Here is an example:

action "Open with MPV" shell "mpv $url"
action "Open with MPV (only audio)" shell "mpv --no-video $url"
action "Open with Firefox" shell "firefox $url"

The standard input and output is still redirected to the same file descriptor as Dillo.

The commands are 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.

Implements the logic to read rules from ~/.dillo/rulesrc which define
custom actions to handle a URL. Here is an example:

  action "Open with MPV" shell "mpv $url"
  action "Open with MPV (only audio)" shell "mpv --no-video $url"
  action "Open with Firefox" shell "firefox $url"

The standard input and output is still redirected to the same file
descriptor as Dillo.

The commands are 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.
@rodarima rodarima added this to the Release 3.2.0 milestone Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant