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

Change query_runfile (View) to use xdg-open by default #209

Merged
merged 1 commit into from
Oct 27, 2019

Conversation

knixeur
Copy link
Collaborator

@knixeur knixeur commented Oct 10, 2019

Both Edit/View file can be customized by setting EDIT_COMMAND/VIEW_COMMAND
in etc/cfg_notion.lua

Fix #144

Both Edit/View file can be customized by setting EDIT_COMMAND/VIEW_COMMAND
in etc/cfg_notion.lua

Fix #144
etc/cfg_notion.lua Show resolved Hide resolved
-- alternative script to use. The default prompt is "View file:" (translated).
function mod_query.query_runfile(mplex, script, prompt)
mod_query.query_execfile(mplex,
prompt or TR("View file:"),
script or "run-mailcap --action=view")
script or "xdg-open")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

… and if VIEW_COMMAND is global, it can theoretically be used here. Not sure that's clean design, though, and whether or not it should be global. Any opinions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it but I saw mod_dock as a separate module and didn't want to "trust" that those variables are defined. Let me know if you think these should point to those vars.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we decide to go with the "cmds" approach mentioned above, I think (cmds and cmds.VIEW) or "xdg-open" should work around the value being nil

Copy link
Owner

@raboof raboof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 - in this case having them as globals seems OK, since moving them under a namespace would break existing configurations. Perhaps we should mention this in the migration docs?

@raboof raboof merged commit 38f731f into master Oct 27, 2019
@raboof raboof deleted the feat/use_xdg_open branch October 27, 2019 11:50
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.

Consider replacing run-mailcap by xdg-open in the default config
3 participants