lsd icon indicating copy to clipboard operation
lsd copied to clipboard

`layout` config-option: long

Open goyalyashpal opened this issue 1 year ago • 3 comments

not a bug, but a feature request...

$ #- os: 
$ inxi --system | tail -n1
  Desktop: Cinnamon v: 6.0.4 Distro: NixOS 24.05 (Uakari)

$ lsd --version
lsd 1.1.2

$ echo $TERM
xterm-256color

$ echo $LS_COLORS
...

Expected behavior

  • the layout config option has some value say "long" to specify long-listing i.e. equivalent to -l or --long cli flag.
  • documentation for blocks itself mentions this :smile: https://github.com/lsd-rs/lsd/blob/9b310da60085eace5b03c0eba6a3cfa6cbf378de/README.md?plain=1#L143-L145

Actual behavior

layout only accepts grid, tree, oneline and errors out 3 times at long value.

$ lsd
lsd: Configuration file /home/.../.config/lsd/config.yaml format error, layout: unknown variant `long`, expected one of `grid`, `tree`, `oneline` at line 4 column 9.

lsd: Configuration file /home/.../.config/lsd/config.yaml format error, layout: unknown variant `long`, expected one of `grid`, `tree`, `oneline` at line 4 column 9.

lsd: Configuration file /home/.../.config/lsd/config.yaml format error, layout: unknown variant `long`, expected one of `grid`, `tree`, `oneline` at line 4 column 9.

   <...LISTING-CONTENT...>

https://github.com/lsd-rs/lsd/blob/9b310da60085eace5b03c0eba6a3cfa6cbf378de/README.md?plain=1#L209-L213

goyalyashpal avatar Aug 13 '24 11:08 goyalyashpal

i just realised that it would require an option in CLI to enable the grid layout lol i.e. to override the long layout specified in the config.

goyalyashpal avatar Aug 14 '24 10:08 goyalyashpal

Adding a +1 on this.

My config file includes

# == Blocks ==
# This specifies the columns and their order when using the long and the tree
# layout.
# Possible values: permission, user, group, context, size, date, name, inode, links, git
blocks:
  - permission
  - user
  - group
  - size
  - date
  - name

# == Layout ==
# Which layout to use. "oneline" might be a bit confusing here and should be
# called "one-per-line". It might be changed in the future.
# Possible values: grid, tree, oneline
layout: tree

Which gives this

λ lsd
Found existing alias for "lsd". You should use: "ll"
📂  .
├── 📄  .gitignore
├── 📄  Dockerfile
├── 📄  index.php
├── 📄  README.md
└── 📄  style.css

Changed layout to grid and got this:

λ lsd
Found existing alias for "lsd". You should use: "ll"
📄  .gitignore  📄  Dockerfile  📄  index.php  📄  README.md  📄  style.css

Changed layout to oneline and got this

λ lsd
Found existing alias for "lsd". You should use: "ll"
     Name
📄  .gitignore
📄  Dockerfile
📄  index.php
📄  README.md
📄  style.css

aaaaaadrian avatar Jan 07 '25 21:01 aaaaaadrian

Adding a +1 on this.

hi @aaaaaadrian ! please be sure to drop a thumbsup on the description. as that is used as a potentoal priority metric for issues by lots of projects.

goyalyashpal avatar Jan 08 '25 06:01 goyalyashpal