Skip to content
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

Update permission options in README; minor tweaks #1025

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ These are usually something like `C:\Users\username\AppData\Roaming\lsd\config.y

### Custom

You can also provide a configuration file from a non standard location:
You can also provide a configuration file from a non-standard location:
`lsd --config-file [PATH]`

### Config file content
Expand Down Expand Up @@ -224,7 +224,7 @@ size: default

# == Permission ==
# Specify the format of the permission column
# Possible value: rwx, octal, attributes (windows only), disabled
# Possible value: rwx, octal, attributes (windows only), disable
# permission: rwx

# == Sorting ==
Expand Down Expand Up @@ -292,7 +292,7 @@ The valid theme configurations are:

- `default`: the default color scheme shipped in `lsd`
- `custom`: use a custom color scheme defined in `colors.yaml`
- *(deprecated) theme_file_name(yaml): use the theme file to specify colors(without the `yaml` extension)*
- *(deprecated) theme_file_name(yaml): use the theme file to specify colors (without the `yaml` extension)*

When set to `custom`, `lsd` will look for `colors.yaml` in the
XDG Base Directory, e.g. ~/.config/lsd/colors.yaml
Expand Down Expand Up @@ -359,7 +359,7 @@ git-status:
```

When creating a theme for `lsd`, you can specify any part of the default theme,
and then change its colors, the items missed would fallback to use the default colors.
and then change its colors, the items missed would fall back to use the default colors.

Please also notice that an empty theme is **NOT** supported due to
[a bug in serde lib](https://github.com/dtolnay/serde-yaml/issues/86).
Expand All @@ -380,7 +380,7 @@ Check [Icon Theme file content](#icon-theme-file-content) for details.
The final set of icons used will be a combination of what is shipped with in `lsd` with overrides from config applied on top of it.
*You can find the default set of icons [here](src/theme/icon.rs).*

Both nerd font glyphs and unicode emojis can be used for icons. You can find an example of icons customization below.
Both nerd font glyphs and Unicode emojis can be used for icons. You can find an example of icons customization below.

```yaml
name:
Expand Down Expand Up @@ -447,18 +447,18 @@ For `lsd` currently, it reads a system environment variable called LS_COLORS. Pl

### Icons not showing up

For `lsd` to be able to display icons, the font has to include special font glyphs. This might not be the case for most fonts that you download. Thankfully, you can patch most fonts using [NerdFont](https://www.nerdfonts.com/) and add these icons. Or you can just download an already patched version of your favourite font from [NerdFont font download page](https://www.nerdfonts.com/font-downloads).
Here is a guide on how to setup fonts on [macOS](https://github.com/lsd-rs/lsd/issues/199#issuecomment-494218334) and [Android](https://github.com/lsd-rs/lsd/issues/423).
For `lsd` to be able to display icons, the font has to include special font glyphs. This might not be the case for most fonts that you download. Thankfully, you can patch most fonts using [NerdFont](https://www.nerdfonts.com/) and add these icons. Or you can just download an already patched version of your favorite font from [NerdFont font download page](https://www.nerdfonts.com/font-downloads).
Here is a guide on how to set up fonts on [macOS](https://github.com/lsd-rs/lsd/issues/199#issuecomment-494218334) and [Android](https://github.com/lsd-rs/lsd/issues/423).

To check if the font you are using is setup correctly, try running the following snippet in a shell and see if that [prints a folder icon](https://github.com/lsd-rs/lsd/issues/510#issuecomment-860000306). If it prints a box, or question mark or something else, then you might have some issues in how you setup the font or how your terminal emulator renders the font.
To check if the font you are using is set up correctly, try running the following snippet in a shell and see if that [prints a folder icon](https://github.com/lsd-rs/lsd/issues/510#issuecomment-860000306). If it prints a box, or question mark or something else, then you might have some issues in how you set up the font or how your terminal emulator renders the font.

```sh
echo $'\uf115'
```

### Icons missing or not rendering correctly using PuTTY/KiTTY on Windows

First of all, make sure a patched font is installed and PuTTY/KiTTY is configurated to use it, please check [Prerequisites](#prerequisites).
First of all, make sure a patched font is installed and PuTTY/KiTTY is configured to use it, please check [Prerequisites](#prerequisites).

There are problems for PuTTY/KiTTY to show 2 char wide icons, make sure using a 1 char wide font like [Hack Regular Nerd Font Complete Mono Windows Compatible](https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/Hack/Regular/complete/Hack%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf), check [this issue](https://github.com/lsd-rs/lsd/issues/331) for detail.

Expand All @@ -477,18 +477,18 @@ The default colors are:
| | ![#d75f87](https://via.placeholder.com/15/d75f87/000000?text=+) No Access | ![#00d7d7](https://via.placeholder.com/15/00d7d7/000000?text=+) Pipe/Symlink/Blockdevice/Socket/Special | | |
| | | ![#d78700](https://via.placeholder.com/15/d78700/000000?text=+) CharDevice | | |

_Checkout [trapd00r/LS_COLORS](https://github.com/trapd00r/LS_COLORS) and [sharkdp/vivid](https://github.com/sharkdp/vivid) for help in themeing using `LS_COLORS`._
_Checkout [trapd00r/LS_COLORS](https://github.com/trapd00r/LS_COLORS) and [sharkdp/vivid](https://github.com/sharkdp/vivid) for help in theming using `LS_COLORS`._

### First char of folder/file getting trimmed

Workaround for Konsole: ㅤEdit the config file (or [create it](#config-file-location) if it doesn't already exist) and paste the following into it (contains invisible unicode characters):
Workaround for Konsole: ㅤEdit the config file (or [create it](#config-file-location) if it doesn't already exist) and paste the following into it (contains invisible Unicode characters):

```yml
icons:
separator: " ㅤ"
```

This is a known issue in a few terminal emulator. Try using a different terminal emulator like. [Alacritty](https://github.com/alacritty/alacritty) and [Kitty](https://github.com/kovidgoyal/kitty) are really good alternatives. You might also want to check if your font is responsible for causing this.
This is a known issue in a few terminal emulators. Try using a different terminal emulator like. [Alacritty](https://github.com/alacritty/alacritty) and [Kitty](https://github.com/kovidgoyal/kitty) are really good alternatives. You might also want to check if your font is responsible for causing this.
To verify this, try running lsd with icons disabled and if it still does not have the first character, then this is an lsd bug:

```sh
Expand All @@ -501,7 +501,7 @@ lsd --icon never --ignore-config

### Icons are showing up strangely

Nerd Fonts is moving the codepoints of the Material Design Icons in 3.0, so lsd has updated the icons in #830. If your icons look weird, use fonts that have been patched using Nerd Fonts v2.3.0 or later.
Nerd Fonts is moving the code points of the Material Design Icons in 3.0, so lsd has updated the icons in #830. If your icons look weird, use fonts that have been patched using Nerd Fonts v2.3.0 or later.

See also: <https://github.com/ryanoasis/nerd-fonts/releases/tag/v2.3.3>

Expand Down