-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
qutebrowser: add quickmark support #2059
qutebrowser: add quickmark support #2059
Conversation
quickmarksFile = optionals (cfg.quickmarks != { }) concatStringsSep "\n" | ||
((mapAttrsToList formatQuickmarks cfg.quickmarks)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, isn't the (
in the wrong place? I would have expected
quickmarksFile = optionals (cfg.quickmarks != { }) concatStringsSep "\n" | |
((mapAttrsToList formatQuickmarks cfg.quickmarks)); | |
quickmarksFile = optionals (cfg.quickmarks != { }) (concatStringsSep "\n" | |
(mapAttrsToList formatQuickmarks cfg.quickmarks)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me as well, and that's how I initially wrote it. The format
utility converted it to this, so i assumed that is prefered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, optionals
doesn't check whether the last argument is actually a list so it returns whatever is on the right, in this case the function concatStringsSep
, which is then invoked with the rest.
{
optionals =
# Condition
cond:
# List to return if condition is true
elems: if cond then elems else [];
}
Thanks! Looks OK to me. Just had two minor comments. |
78893d5
to
bcf004d
Compare
Would love to get this merged :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This is now possible as nix-community/home-manager#2059 got merged
Closes: #1230
Description
This allows the qutebrowser derivation to parse quickmarks, which I've been wanting to use for a while. If unset, qutebrowser will manage the file instead of home-manager.
When quickmarks are set through home-manager, they cannot be edited at runtime.
Checklist
Change is backwards compatible.
Code formatted with
./format
.Code tested through
nix-shell --pure tests -A run.all
.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.