diff options
| author | Craig Jennings <c@cjennings.net> | 2026-01-26 17:36:38 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-01-26 17:36:38 -0600 |
| commit | dada2f255daaa2fb493ec8c7d47e2a8123aea494 (patch) | |
| tree | 0c0eeb84bb7b6e66a2d7f41cdfd061b25f80cc14 /dotfiles/common/.zsh/lib/-ftb-colorize | |
| parent | d50e5955837788fc69b4d5bc74cb574b859ed31a (diff) | |
refactor(dotfiles): rename system/ to common/ and remove unused configs
Rename dotfiles/system to dotfiles/common for clarity - indicates
shared dotfiles used across all desktop environments (DWM, Hyprland).
Removed config directories for uninstalled applications:
- ghostty (using different terminal)
- lf (using ranger instead)
- mopidy (using mpd instead)
- nitrogen (X11-only, obsolete for Wayland)
- pychess (not installed)
- JetBrains (not installed via archsetup)
- youtube-dl (using yt-dlp with different config location)
Kept audacious config for potential future use.
Updated all references in archsetup, CLAUDE.md, todo.org, and
validation.sh.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'dotfiles/common/.zsh/lib/-ftb-colorize')
| -rw-r--r-- | dotfiles/common/.zsh/lib/-ftb-colorize | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/dotfiles/common/.zsh/lib/-ftb-colorize b/dotfiles/common/.zsh/lib/-ftb-colorize new file mode 100644 index 0000000..3b1909b --- /dev/null +++ b/dotfiles/common/.zsh/lib/-ftb-colorize @@ -0,0 +1,34 @@ +#!/hint/zsh +emulate -L zsh -o cbases -o octalzeroes + +local REPLY +local -a reply stat lstat + +# fzf-tab-lscolors::match-by $1 lstat follow +zstat -A lstat -L -- $1 +# follow symlink +(( lstat[3] & 0170000 )) && zstat -A stat -- $1 2>/dev/null + +fzf-tab-lscolors::from-mode "$1" "$lstat[3]" $stat[3] +# fall back to name +[[ -z $REPLY ]] && fzf-tab-lscolors::from-name $1 + +# If this is a symlink +if [[ -n $lstat[14] ]]; then + local sym_color=$REPLY + local rsv_color=$REPLY + local rsv=$lstat[14] + # If this is not a broken symlink + if [[ -e $rsv ]]; then + # fzf-tab-lscolors::match-by $rsv stat + zstat -A stat -- $rsv + fzf-tab-lscolors::from-mode $rsv $stat[3] + # fall back to name + [[ -z $REPLY ]] && fzf-tab-lscolors::from-name $rsv + rsv_color=$REPLY + fi + dpre=$'\033[0m\033['$sym_color'm' + dsuf+=$'\033[0m -> \033['$rsv_color'm'$rsv +else + dpre=$'\033[0m\033['$REPLY'm' +fi |
