Open hawkw opened 2 months ago
@hawkw FYI, this appears to be fixed as of version 1.1.5. Here are some custom overrides in my icons.yaml
file:
The custom icons are only applied when the icon theme is fancy
, as evidenced by these lines:
https://github.com/lsd-rs/lsd/blob/82124fd0b946855254721117d7ba004c377d0f44/src/icon.rs#L16-L26
This should ideally be reflected in the documentation, I spent quite a while trying to figure out why my icons were not working.
@hxlnt , I am not able to reproduce your setup with the same version. Could you please share your icons.yaml
file?
@nilp0inter Sure, though the characters won't render correctly here, as they require a Nerdfont. I've also included my config.yaml.
config.yaml:
classic: false
blocks:
- name
- size
- date
color:
when: auto
theme: custom
date: relative
dereference: false
icons:
when: always
theme: fancy
separator: " "
indicators: false
layout: tree
recursion:
enabled: false
depth: 1
size: short
sorting:
column: name
reverse: false
dir-grouping: first
no-symlink: false
total-size: false
hyperlink: always
symlink-arrow: ⇒
header: true
icons.yaml
name:
.bashrc:
.eslintrc.js:
.eslintrc.json:
.eslintrc.yml:
.git:
.gitignore:
.gitlab-ci.yml:
.todo:
.trash:
commit_editmsg:
config:
desktop:
description:
documents:
downloads:
fetch_head:
go.mod:
go.sum:
head:
heroku.yml:
index:
lib:
license:
makefile:
music:
node_modules:
orig_head:
package.json:
pictures:
public:
pyproject.toml:
scripts:
src:
tests:
videos:
extension:
1:
2:
3:
4:
asm:
avi:
bak:
bat:
bin:
bmp:
c:
cpp:
cert:
cfg:
cson:
css:
csv:
db:
deb:
doc:
docx:
ejs:
exe:
go:
gif:
git:
h:
hpp:
hex:
htm:
html:
img:
ini:
ino:
jpeg:
jpg:
js:
json:
jsx:
key:
list:
lock:
log:
lua:
md:
m4v:
mpeg:
mpg:
nes:
nfo:
old:
otf:
png:
ppt:
pptx:
py:
rar:
rom:
rs:
rss:
save:
sh:
tar:
toml:
ts:
tsx:
ttf:
txt:
vue:
xls:
xlsx:
xml:
yaml:
yml:
zip:
filetype:
dir:
file:
@hxlnt Thanks! I was able to identify the issue. It turned out that I was trying to override the Downloads
folder, but it wasn't having the desired effect. Upon further investigation, I discovered that the keys should be in lowercase. To successfully override the icon in the Downloads
directory, I had to include a downloads
entry.
Version
version
What OS are you seeing the problem on?
Linux
installation
From Nixpkgs
term
ls-colors
What happened?
I have an
icons.yaml
file in$HOME/config/lsd/icons.yaml
. Theicons.theme
key in$HOME/.config/lsd/config.yaml
is set to "unicode", andicons.when
is set to "auto". However, my specified file type icons inicons.yaml
do not seem to override the defaults.For example:
Note that the overridden directory, block device, char device, and file icons in
icons.yaml
are not used.What expected?
I would have expected the overridden icons to be used, as described in the README here.
What else?
It seems like the documentation on setting a custom icon theme in the README may no longer describe
lsd
's actual behavior? Looking atlsd/src/theme.rs
, it looks like theTheme
struct now attempts to parse an icon theme, color theme, and Git symbols from the same file: https://github.com/lsd-rs/lsd/blob/9b310da60085eace5b03c0eba6a3cfa6cbf378de/src/theme.rs#L18-L26https://github.com/lsd-rs/lsd/blob/9b310da60085eace5b03c0eba6a3cfa6cbf378de/src/theme.rs#L39-L83
I'd be happy to open a PR to either update the documentation or fix the implementation so that it does what the documentation says! However, before doing that, it would be great to hear from the maintainers regarding what the intended behavior here is. Is the icon theme still supposed to be parsed from
$XDG_CONFIG_HOME/lsd/icons.yaml
as described in the README, or is the apparent behavior of parsing both the icons and color theme from the same YAML file correct? If the current behavior is intended, how is the new theme file supposed to be used --- where should it be located, and how do I pointlsd
at it?