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/system/.config/lf/draw_img | |
| 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/system/.config/lf/draw_img')
| -rwxr-xr-x | dotfiles/system/.config/lf/draw_img | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/dotfiles/system/.config/lf/draw_img b/dotfiles/system/.config/lf/draw_img deleted file mode 100755 index 5a70d5e..0000000 --- a/dotfiles/system/.config/lf/draw_img +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env bash - -clear_screen() { - printf '\e[%sH\e[9999C\e[1J%b\e[1;%sr' \ - "$((LINES-2))" "${TMUX:+\e[2J}" "$max_items" -} - -# Get a file's mime_type. -mime_type=$(file -bi "$1") - -# File isn't an image file, give warning. -if [[ $mime_type != image/* ]]; then - lf -remote "send $id echoerr 'Not an image'" - exit -fi - -w3m_paths=(/usr/{local/,}{lib,libexec,lib64,libexec64}/w3m/w3mi*) -read -r w3m _ < <(type -p w3mimgdisplay "${w3m_paths[@]}") -read -r LINES COLUMNS < <(stty size) - -# Get terminal window size in pixels and set it to WIDTH and HEIGHT. -export $(xdotool getactivewindow getwindowgeometry --shell) - -# Get the image size in pixels. -read -r img_width img_height < <("$w3m" <<< "5;${CACHE:-$1}") - -((img_width > WIDTH)) && { - ((img_height=img_height*WIDTH/img_width)) - ((img_width=WIDTH)) -} - -((img_height > HEIGHT)) && { - ((img_width=img_width*HEIGHT/img_height)) - ((img_height=HEIGHT)) -} - -# Variable needed for centering image. -HALF_HEIGHT=$(expr $HEIGHT / 2) -HALF_WIDTH=$(expr $WIDTH / 2) -HALF_IMG_HEIGHT=$(expr $img_height / 2) -HALF_IMG_WIDTH=$(expr $img_width / 2) -X_POS=$(expr $HALF_WIDTH - $HALF_IMG_WIDTH) -Y_POS=$(expr $HALF_HEIGHT - $HALF_IMG_HEIGHT) - -clear_screen -# Hide the cursor. -printf '\e[?25l' - -# Display the image. -printf '0;1;%s;%s;%s;%s;;;;;%s\n3;\n4\n' \ - ${X_POS:-0} \ - ${Y_POS:-0} \ - "$img_width" \ - "$img_height" \ - "${CACHE:-$1}" | "$w3m" &>/dev/null - -# Wait for user input. -read -ern 1 - -# Clear the image. -printf '6;%s;%s;%s;%s\n3;' \ - "${X_POS:-0}" \ - "${Y_POS:-0}" \ - "$WIDTH" \ - "$HEIGHT" | "$w3m" &>/dev/null - -clear_screen |
