diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index af83ab4..d2e853b 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -10,6 +10,10 @@ if command -v broot >/dev/null 2>&1; then source "$ZDOTDIR/broot.zsh" fi +if command -v eza >/dev/null 2>&1; then + source "$ZDOTDIR/eza.zsh" +fi + if command -v fzf >/dev/null 2>&1; then source "$ZDOTDIR/fzf.zsh" fi diff --git a/config/zsh/aliases.zsh b/config/zsh/aliases.zsh index 96d2c7c..43f6379 100644 --- a/config/zsh/aliases.zsh +++ b/config/zsh/aliases.zsh @@ -3,7 +3,7 @@ if command -v eza >/dev/null 2>&1; then # Prefer eza if installed alias \ - ls="eza --classify --group-directories-first --group --links" \ + ls="eza --classify --group-directories-first --group --links --smart-group" \ la="ls --all" \ lt="ls --long --tree --ignore-glob='.git'" \ lta="lt --all" \ diff --git a/config/zsh/eza.zsh b/config/zsh/eza.zsh new file mode 100755 index 0000000..0878fea --- /dev/null +++ b/config/zsh/eza.zsh @@ -0,0 +1,98 @@ +black=30 +red=31 +green=32 +yellow=33 +blue=34 +magenta=35 +cyan=36 +white=37 + +colors=( + di=$blue # directories + ex=$green # executable files + # fi # regular files + # pi # named pipes + # so # sockets + # bd # block devices + # cd # character devices + # ln # symlinks + # or # symlinks with no target + # oc # the permissions displayed as octal + ur=$yellow # the user-read permission bit + uw=$red # the user-write permission bit + ux=$green # the user-execute permission bit for regular files + ue=$green # the user-execute for other file kinds + # gr # the group-read permission bit + # gw # the group-write permission bit + # gx # the group-execute permission bit + # tr # the others-read permission bit + # tw # the others-write permission bit + # tx # the others-execute permission bit + # su # setuid, setgid, and sticky permission bits for files + # sf # setuid, setgid, and sticky for other file kinds + # xa # the extended attribute indicator + # sn # the numbers of a file’s size (sets nb, nk, nm, ng and nt) + # nb # the numbers of a file’s size if it is lower than 1 KB/Kib + nk=$green # the numbers of a file’s size if it is between 1 KB/KiB and 1 MB/MiB + # nm # the numbers of a file’s size if it is between 1 MB/MiB and 1 GB/GiB + # ng # the numbers of a file’s size if it is between 1 GB/GiB and 1 TB/TiB + # nt # the numbers of a file’s size if it is 1 TB/TiB or higher + # sb # the units of a file’s size (sets ub, uk, um, ug and ut) + # ub # the units of a file’s size if it is lower than 1 KB/Kib + # uk # the units of a file’s size if it is between 1 KB/KiB and 1 MB/MiB + # um # the units of a file’s size if it is between 1 MB/MiB and 1 GB/GiB + # ug # the units of a file’s size if it is between 1 GB/GiB and 1 TB/TiB + # ut # the units of a file’s size if it is 1 TB/TiB or higher + # df # a device’s major ID + # ds # a device’s minor ID + uu=$white # a user that’s you + uR=$red # a user that’s root + un=$yellow # a user that’s someone else + gu=$white # a group that you belong to + gR=$red # a group related to root + gn=$yellow # a group you aren’t a member of + lc=$red # a number of hard links + # lm # a number of hard links for a regular file with at least two + # ga # a new flag in Git + # gm # a modified flag in Git + # gd # a deleted flag in Git + # gv # a renamed flag in Git + # gt # a modified metadata flag in Git + # gi # an ignored flag in Git + # gc # a conflicted flag in Git + # Gm # main branch of repo + # Go # other branch of repo + # Gc # clean branch of repo + # Gd # dirty branch of repo + # xx # “punctuation”, including many background UI elements + # da # a file’s date + # in # a file’s inode number + # bl # a file’s number of blocks + # hd # the header row of a table + # lp # the path of a symlink + # cc # an escaped character in a filename + # bO # the overlay style for broken symlink paths + # sp # special (not file, dir, mount, exec, pipe, socket, block device, char device, or link) + # mp # a mount point + # im # a regular file that is an image + # vi # a regular file that is a video + # mu # a regular file that is lossy music + # lo # a regular file that is lossless music + # cr # a regular file that is related to cryptography (ex: key or certificate) + # do # a regular file that is a document (ex: office suite document or PDF) + # co # a regular file that is compressed + # tm # a regular file that is temporary (ex: a text editor’s backup file) + # cm # a regular file that is a compilation artifact (ex: Java class file) + bu=$yellow # a regular file that is used to build a project (ex: Makefile) + sc=$yellow # a regular file that is source code + # Sn # No security context on a file + # Su # SELinux user + # Sr # SELinux role + # St # SELinux type + # Sl # SELinux level + # ff # BSD file flags +) + +export EZA_COLORS="${(pj.:.)colors}" +unset colors +