Add lsd config and color theme

This commit is contained in:
cnphpbb
2026-05-18 09:07:02 +08:00
parent 659f7056fd
commit 54ff283124
2 changed files with 105 additions and 0 deletions

73
$user/lsd/config.yaml Normal file
View File

@@ -0,0 +1,73 @@
# ========== 经典模式 ==========
# 如果为 true不使用任何颜色或图标与标准 ls 行为类似
classic: false
# ========== 分块Blocks ==========
# 定义每行显示哪些信息块,按顺序排列
blocks:
- permission # 文件权限 (rwxr-xr-x)
- user # 文件所有者
- group # 用户组
- size # 文件大小
- date # 日期/时间
- name # 文件名(必须包含)
# ========== 颜色主题 ==========
color:
# 何时使用颜色always总是、auto自动、never从不
when: auto
# 自定义文件类型颜色(覆盖默认值)
theme: custom
# ========== 日期格式 ==========
date: "+%Y-%m-%d %H:%M:%S" # 可选relative相对时间、isoISO格式
# ========== 跟随符号链接 ============
dereference: false
# ========== 图标 ==========
icons:
# 何时显示图标always、auto、never
when: auto
# 图标主题(需要对应的 Nerd Font
theme: fancy # 或 unicode
# 分隔符(图标与文件名之间的字符)
separator: " "
# ========== 忽略选项 ==========
ignore-globs:
- "*.bak" # 忽略所有 .bak 文件
- ".git" # 忽略 .git 目录
- "__pycache__" # 忽略 Python 缓存
# ========== 布局 ==========
layout: grid # grid网格| tree树状| oneline单行
# ========== 递归深度(--tree 时有效) ==========
recursion:
enabled: false
depth: 3 # 递归显示的最大深度
# ========== 排序 ==========
sorting:
column: name # 排序字段name、size、time、version、extension
# reverse: false # 是否倒序
# dir-grouping: first # 目录排序first靠前、last靠后、none
# ========== 符号链接 ==========
# 是否显示符号链接的目标路径
no-symlink: false
symlink-arrow: " ➜ "
# ========== 总大小 ==========
total-size: false # 是否显示总大小(在目录底部)
# ========== 截断所有者名 ==========
truncate-owner:
after: 8 # 用户名超过多少字符截断
# ========== 超链接 ==========
hyperlink: never # always | auto | never 是否生成终端超链接

32
$user/lsd/ colors.yaml Normal file
View File

@@ -0,0 +1,32 @@
# 文件类型颜色
file-type:
directory:
foreground: cyan
bold: true
symlink:
foreground: magenta
italic: true
executable:
foreground: green
bold: true
socket:
foreground: red
pipe:
foreground: yellow
block-device:
foreground: red
char-device:
foreground: yellow
# 文件扩展名颜色(覆盖文件类型颜色)
extensions:
rs:
foreground: white
bold: true
py:
foreground: yellow
js:
foreground: green
md:
foreground: cyan
italic: true