dotfiles

My dotfiles used for LARBS
Log | Files | Refs | README | LICENSE

vifmimg (637B)


      1 #!/usr/bin/env bash
      2 [ -z "$FIFO_UEBERZUG" ] && exit
      3 
      4 readonly ID_PREVIEW="preview"
      5 
      6 if [ "$1" = "draw" ]; then
      7 	declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW" [x]="$2" [y]="$3" [max_width]="$4" [max_height]="$5" [path]="${PWD}/$6") > "$FIFO_UEBERZUG"
      8 elif [ "$1" = "videopreview" ]; then
      9  	[ ! -f "/tmp/$6.png" ] && ffmpegthumbnailer -i "${PWD}/$6" -o "/tmp/$6.png" -s 0 -q 10 &&
     10 	declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW" [x]="$2" [y]="$3" [max_width]="$4" [max_height]="$5" [path]="/tmp/$6.png") > "$FIFO_UEBERZUG"
     11 else
     12 	declare -p -A cmd=([action]=remove [identifier]="$ID_PREVIEW") > "$FIFO_UEBERZUG"
     13 fi