{ pkgs, ... }: { programs.yazi = { enable = true; enableFishIntegration = true; keymap = { manager.prepend_keymap = [ { on = [ "g" "e" ]; run = "arrow 100000000"; desc = "Zum Ende der Liste springen (ge)"; } { on = [ "T" ]; run = ''shell --orphan --block=false "${pkgs.alacritty}/bin/alacritty"''; desc = "Terminal in neuem Fenster öffnen"; } { on = [ "E" ]; run = ''shell --orphan --block=false "${pkgs.kdePackages.dolphin}/bin/dolphin ."''; desc = "Dolphin in diesem Ordner öffnen"; } { on = [ "G" ]; run = ''shell --orphan --block=false "${pkgs.alacritty}/bin/alacritty -e ${pkgs.lazygit}/bin/lazygit"''; desc = "Lazygit in neuem Fenster öffnen"; } { on = [ "" ]; run = '' shell -- ripdrag --no-click --and-exit --icon-size 64 --target --all "$@" | while read -r filepath; do cp -nR "$filepath" . done ''; desc = "Drag-n-drop (Copy No-Clobber)"; } { on = [ "" ]; run = '' shell -- ripdrag --no-click --and-exit --icon-size 64 --target --all "$@" | while read -r filepath; do cp -fR "$filepath" . done ''; desc = "Drag-n-drop (Force Overwrite)"; } { on = [ "i" ]; run = '' shell --block --confirm ' clear file="$1" mime=$(file --mime-type -b "$file") echo "==================================================" echo " EIGENSCHAFTEN: $(basename "$file")" echo "==================================================" # Basis-Infos printf "%-18s %s\n" "Typ:" "$mime" printf "%-18s %s\n" "Adresse:" "$(realpath "$file")" printf "%-18s %s (%s Bytes)\n" "Größe:" "$(du -h "$file" | cut -f1)" "$(stat -c %s "$file")" echo "--------------------------------------------------" echo " ZEITSTEMPEL" printf "%-18s %s\n" "Geändert:" "$(stat -c %y "$file" | cut -d. -f1)" printf "%-18s %s\n" "Letzter Zugriff:" "$(stat -c %x "$file" | cut -d. -f1)" echo "--------------------------------------------------" echo " DETAILS" # --- PDF SEKTION --- if [[ "$mime" == "application/pdf" ]]; then # Nutzt pdfinfo aus poppler_utils pdfinfo "$file" | grep -E "Pages:|PDF version:|Title:|Author:|Page size:" | while read -r line; do label=$(echo "$line" | cut -d: -f1) value=$(echo "$line" | cut -d: -f2- | xargs) printf "%-18s %s\n" "$label:" "$value" done # --- BILD SEKTION --- elif [[ "$mime" == image/* ]]; then # Nutzt identify aus imagemagick dimensions=$(identify -format "%wx%h" "$file") printf "%-18s %s Pixel\n" "Auflösung:" "$dimensions" printf "%-18s %s\n" "Farbraum:" "$(identify -format "%[colorspace]" "$file")" # --- AUDIO/VIDEO SEKTION --- elif [[ "$mime" == audio/* || "$mime" == video/* ]]; then # Nutzt mediainfo für Bitrate und Dauer mediainfo --Inform="General;%-18.18Name: %Format%\n%-18.18Name: %Duration/String3%\n%-18.18Name: %OverallBitRate/String%" "$file" if [[ "$mime" == video/* ]]; then mediainfo --Inform="Video;%-18.18Name: %Width%x%Height% Pixel" "$file" fi fi echo "==================================================" read -p "Drücke Enter zum Schließen..." _ ' ''; desc = "Detaillierte Eigenschaften (PDF, Media, Image)"; } ]; }; settings = { mgr = { show_hidden = true; sort_by = "natural"; sort_sensitive = true; sort_reverse = false; sort_dir_first = true; linemode = "none"; show_symlink = true; ratio = [ 1 3 4 ]; layout_transition = "none"; }; sort_by = "natural"; sort_sensitive = true; sort_reverse = false; sort_dir_first = true; linemode = "none"; show_hidden = true; show_symlink = true; preview = { image_filter = "lanczos3"; image_quality = 90; tab_size = 1; max_width = 600; max_height = 900; cache_dir = ""; ueberzug_scale = 1; ueberzug_offset = [ 0 0 0 0 ]; }; opener = { play = [ { run = ''haruna "$@"''; orphan = true; desc = "Play"; } ]; edit = [ { run = ''$EDITOR "$@"''; block = true; desc = "Edit"; } ]; view = [ { run = ''gwenview "$@"''; orphan = true; desc = "Gwenview"; } ]; pdf = [ { run = ''zathura "$@"''; orphan = true; desc = "Zathura"; } ]; }; open = { rules = [ { mime = "image/*"; use = "view"; } { name = "*.svg"; use = "view"; } { mime = "application/pdf"; use = "pdf"; } { mime = "video/*"; use = "play"; } { mime = "audio/*"; use = "play"; } { mime = "text/*"; use = "edit"; } { mime = "application/json"; use = "edit"; } ]; }; }; }; }