-
-
Notifications
You must be signed in to change notification settings - Fork 323
lsd: init #2080
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
Open
sand4rt
wants to merge
5
commits into
nix-community:master
Choose a base branch
from
sand4rt:lsd
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
lsd: init #2080
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| { mkTarget, ... }: | ||
| mkTarget { | ||
| config = | ||
| { colors }: | ||
| { | ||
| programs.lsd.colors = with colors.withHashtag; { | ||
| user = base04; | ||
| group = base04; | ||
| permission = { | ||
| read = base04; | ||
| write = base03; | ||
| exec = base04; | ||
| exec-sticky = base02; | ||
| no-access = base01; | ||
| octal = base03; | ||
| acl = base03; | ||
| context = base03; | ||
| }; | ||
| date = { | ||
| hour-old = base03; | ||
| day-old = base04; | ||
| older = base02; | ||
| }; | ||
| size = { | ||
| none = base04; | ||
| small = base04; | ||
| medium = base04; | ||
| large = base09; | ||
| }; | ||
| inode = { | ||
| valid = base03; | ||
| invalid = base02; | ||
| }; | ||
| links = { | ||
| valid = base03; | ||
| invalid = base02; | ||
| }; | ||
| tree-edge = base02; | ||
| git-status = { | ||
| default = base03; | ||
| unmodified = base03; | ||
| ignored = base01; | ||
| new-in-index = base0C; | ||
| new-in-workdir = base0C; | ||
| typechange = base0B; | ||
| deleted = base08; | ||
| renamed = base0C; | ||
| modified = base0A; | ||
| conflicted = base09; | ||
| }; | ||
| }; | ||
| }; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { lib, ... }: | ||
| { | ||
| name = "lsd"; | ||
| homepage = "https://github.com/lsd-rs/lsd"; | ||
| maintainers = [ lib.maintainers.sand4rt ]; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { lib, pkgs, ... }: | ||
| let | ||
| package = pkgs.lsd; | ||
| in | ||
| { | ||
| environment = { | ||
| loginShellInit = "${lib.getExe package} flake-parts/flake.nix"; | ||
| systemPackages = [ package ]; | ||
| }; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What value does this explicit theme provide over the
LS_COLORSenvironment variable, which we support due to #560?CC: @arunoruto, @i-am-logger, @jeanlucthumm, @tuxiqae
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.
I guess something like coloring git repos differently is not supported by
LS_COLORS.But even the maintainers suggest using
LS_COLORSfor most of the things: lsd-rs/lsd#402@sand4rt can you take a look at the list here and make a comparison with theming options of
lsd?https://www.bigsoft.co.uk/blog/2008/04/11/configuring-ls_colors
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.
@arunoruto This isn’t about styling files and directories—that’s what LS_COLORS handles, as the maintainer mentioned. This is about customizing the colors of specific lsd UI components, such as git status indicators or tree edges. The config for these components does not conflict with LS_COLORS.
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.
Seems about right, I thought LS_COLORS themes more than just the folders, but maybe that depends on the
lsbinary being used!have you tested how it looks like when both vivid and lsd themes are on? Would be nice if the themes are consistent :)
Uh oh!
There was an error while loading. Please reload this page.
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.
Yeah i use both vivid and lsd
Uh oh!
There was an error while loading. Please reload this page.
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.
Could you provide demonstrative screenshots for the following cases:
vivid(LS_COLOR)lsdConsider temporarily modifying the following relevant testbeds for doing the screenshots:
nix run .#testbeds:lsd:darknix run .#testbeds:vivid:darkOtherwise, if you want to do it locally, ensure the
LS_COLORenvironment variable is not accidentally kept on when it should be disabled. To be safe this probably requires a full logout and login.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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Thanks for the screenshots! Seems like LS_COLORS takes precedence in coloring the folders! But it also styles other aspects too!
Just a small nitpick and correct me if I am wrong, but maybe keep lsd enabled as a module, but disable the theming option of lsd. This would mean we run lsd with no theming, but with LS_COLORS active.
Uh oh!
There was an error while loading. Please reload this page.
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.
Yes, that’s correct.
Not sure if that makes sense.
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.
Ideally,
LS_COLORScovers everything without needing individual applications to explicitly extend its theming support, ensuring theme consistency by only relying onLS_COLORS.However, I would also be fine with extending theming support. Let me know what you think.