forked from DevOps/deploy.stack
Add lsd config and color theme
This commit is contained in:
73
$user/lsd/config.yaml
Normal file
73
$user/lsd/config.yaml
Normal 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(相对时间)、iso(ISO格式)
|
||||||
|
|
||||||
|
# ========== 跟随符号链接 ============
|
||||||
|
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
32
$user/lsd/ colors.yaml
Normal 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
|
||||||
Reference in New Issue
Block a user