Skip to content

ranger: add imagePreviewSupport option and make previews work out of the box #26453

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

Merged
merged 1 commit into from
Jun 27, 2017

Conversation

oxij
Copy link
Member

@oxij oxij commented Jun 7, 2017

Merge #26452 first or this won't build.

Motivation for this change

See commit message.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@@ -1,4 +1,7 @@
{ stdenv, fetchurl, pythonPackages, w3m, file, less }:
{ stdenv, fetchurl, pythonPackages, file, less
, imagePreviewSupport ? true, w3m ? null}:
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder what the purpose of defaulting w3m to null is? As far as I can tell, the expression fails to evaluate if w3m = null is in fact passed here (provided imagePreviewSupport = true). That'd require user intervention of course, but still seems odd to default to an invalid combination of parameter values.

@oxij
Copy link
Member Author

oxij commented Jun 12, 2017 via email

@joachifm
Copy link
Contributor

Expressing optional features is a bit clunky atm, to put it midlly, and have poor discoverability, but that's a topic I'm not too keen on rehashing, so if you prefer using this pattern that's fine by me. I just think the defaults are misleading here, by suggesting a combination of param values that causes eval error.

…the box

Before one had to turn it on manually and update the preview script in dotfiles
manually when ranger updates.

Now it requires zero configuration. Just run `ranger` and it works, and
should continue to work automagically when ranger updates.

Everything still can be (de)configured via `rc.conf` in dotfiles.
@oxij oxij force-pushed the pkg/fix/ranger branch from d770189 to 08ba40a Compare June 20, 2017 13:57
@oxij
Copy link
Member Author

oxij commented Jun 25, 2017 via email

@joachifm joachifm merged commit 4e44b63 into NixOS:master Jun 27, 2017
@joachifm
Copy link
Contributor

Thank you

@oxij oxij deleted the pkg/fix/ranger branch August 29, 2017 11:19
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.

None yet

2 participants