-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
✨ theme: bring icon theme to lsd #707
Conversation
@zwpaper I think we should probably hash out the details for a breaking change before you put in effort to implementing it. Can we start a thread on this, or continue here. Let's finalize about what exactly the change would be, why it is required and any alternate approaches so as to avoid a breaking changes. |
related: maybe related: |
@meain this is why I created this draft PR, let's discuss it here directly. the changes I would like to introduce are that move the current contents of the theme file to become a sub-item of we now have color options in the root of the theme file(introduced by me, what a bad choice🤣) for example: user: 230
group: 187
permission:
read: dark_green I would like to make it: color:
user: 230
group: 187
permission:
read: dark_green
icon:
suffix:
rs: ABCD
md: 0123 |
there may be an option to support both user: 230
group: 187
permission:
read: dark_green and color:
user: 230
group: 187
permission:
read: dark_green in the same time, but I think it is not worthy to keep this compatibility code as we can easily notify user and easily update the theme file. |
I don't think there is anything necessarily bad about having multiple files, one for colors and one for icons. Besides, I see a few positives for this:
|
fine, I did not have a strong opinion on the unique theme file, let's leave it split. |
@meain, how about dropping this theme option? as we discussed in the other issue, the Unicode option is not used in most cases, and the if a user want to use an Unicode theme, they can create a custom one by this PR's feature. |
How about for icons theme, we explicitly call it For folks without patched fonts, One other option that I strongly prefer is something different. We don't let users specify a file, instead if a file called |
for the Unicode part, we currently have ONLY 2 icons used, one for folders, and one for files, even more, these two Unicode icons can NOT work in MOST of the systems including the widely used macOS. |
for the default theme file part, I am totally ok with the BUT offering the ability to specify a file(or path) is a necessary one, as users can save many themes and switch in need. |
the default theme files could be another enhancement, I have created one to discuss #709 |
The idea is that these files will be how they customize it, not the default theme. I don't think adding the default theme values as files in would be all that useful.
For that usecase, having the file with a consistent name is a much better approach than changing the path in
Since this will be necessary along with the icons config file change, I think we can track it here itself along with this PR. What do you think? |
I am saying that the file works like users' default theme, but putting the real default theme in it. we have no divergence in this part.
I don't really think that a symbol link or copying files are better than changing the so that my point is we can keep both of the features, we reserved the
|
One more question appeared, should we use the char directly or Hex in config file? specifying chars is supported now. we have to do something more if we want to support Hex format. |
It does not really have to be symlink, it could even be the user replacing the file with a new one there. Here is an example situation. Say the user has a script which runs in the background and change the theme everywhere in the evening. If we have separate files, they can just replace the file. But if the config is just a path, they will have to find some way to edit content within a yaml file which I believe would be harder and might require external tools like yq for example.
I was thinking about deprecating the old option as that has been confusing to people. Example: #655 , #566
Should the entire escape code work as is? As in, won't they be able to provide something like |
I still believe that specifying the theme in config file is the proper config file usage. as I mentioned above, we can offer the default file, but I don't think we should deprecate the previous one. |
I feel like there is some communication gap here. You can think of
The reason why I thought we could deprecate the old way was because having multiple ways can possibly be confusing to folks. We have to decide which route we are taking before we go and implement it for icons. |
@meain I am still not convinced, but I dropped the custom file option and continued the PR as you insisted. I check the default icon theme file if no icon theme flag is present, but not handling the color theme file, one reason is that the color theme file has gone public with the previous release, and another is that this PR should limit to icons. |
Makes sense. We can do the color theme change in a different PR. The idea for color theme file is to support both for a while with only the newer one advertised and depreciate the old option after some time and remove. |
Codecov Report
@@ Coverage Diff @@
## master #707 +/- ##
==========================================
- Coverage 87.01% 86.78% -0.23%
==========================================
Files 41 43 +2
Lines 4628 4313 -315
==========================================
- Hits 4027 3743 -284
+ Misses 601 570 -31
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
51a345d
to
52ed8bd
Compare
2870205
to
1c8fd8f
Compare
so that we can add icon theme Signed-off-by: zwPapEr <zw.paper@gmail.com>
Signed-off-by: zwPapEr <zw.paper@gmail.com>
Signed-off-by: zwPapEr <zw.paper@gmail.com> Signed-off-by: Wei Zhang <kweizh@gmail.com>
Signed-off-by: Wei Zhang <kweizh@gmail.com>
Signed-off-by: Wei Zhang <kweizh@gmail.com>
Signed-off-by: Wei Zhang <kweizh@gmail.com>
Signed-off-by: Wei Zhang <kweizh@gmail.com>
Signed-off-by: Wei Zhang <kweizh@gmail.com>
Signed-off-by: Wei Zhang <kweizh@gmail.com>
d04f913
to
42b23fd
Compare
this now should be good to go after CICD if there are no other problems. |
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.
Just some small things that I missed before.
Signed-off-by: zwPapEr <zw.paper@gmail.com>
thanks for the nice catch! @meain please take another look. |
Co-authored-by: Abin Simon <abinsimon10@gmail.com>
@meain suggestion committed |
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.
And now we have customisible icons. Thanks for this :D.
…957) ✨ theme: bring icon theme to lsd by @zwpaper in #707 is included in [Release v1.0.0](https://github.com/lsd-rs/lsd/releases/tag/v1.0.0).
refactor color to be under theme so that we can add icon theme
IMPORTANT
this breaks the theme config by moving the origin one to under
color:
TODO
cargo fmt