aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.config/vifm/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.config/vifm/scripts')
-rw-r--r--dotfiles/.config/vifm/scripts/README6
-rwxr-xr-xdotfiles/.config/vifm/scripts/imgc16
-rwxr-xr-xdotfiles/.config/vifm/scripts/imgt38
-rwxr-xr-xdotfiles/.config/vifm/scripts/vifmimg53
-rwxr-xr-xdotfiles/.config/vifm/scripts/vifmrun15
5 files changed, 0 insertions, 128 deletions
diff --git a/dotfiles/.config/vifm/scripts/README b/dotfiles/.config/vifm/scripts/README
deleted file mode 100644
index 7694952..0000000
--- a/dotfiles/.config/vifm/scripts/README
+++ /dev/null
@@ -1,6 +0,0 @@
-This directory is dedicated for user-supplied scripts/executables.
-vifm modifies its PATH environment variable to let user run those
-scripts without specifying full path. All subdirectories are added
-as well. File in a subdirectory overrules file with the same name
-in parent directories. Restart might be needed to recognize files
-in newly created or renamed subdirectories. \ No newline at end of file
diff --git a/dotfiles/.config/vifm/scripts/imgc b/dotfiles/.config/vifm/scripts/imgc
deleted file mode 100755
index 941b7e7..0000000
--- a/dotfiles/.config/vifm/scripts/imgc
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-W3MIMGDISPLAY="/usr/lib/w3m/w3mimgdisplay"
-FONTH=18 # Size of one terminal row
-FONTW=9 # Size of one terminal column
-
-X=$1
-Y=$2
-COLUMNS=$3
-LINES=$4
-
-x=$((FONTW * X))
-y=$((FONTH * Y))
-
-erase="6;$x;$y;$(( FONTW*COLUMNS ));$(( FONTH*LINES ))\n3;"
-echo -e "$erase" | $W3MIMGDISPLAY
diff --git a/dotfiles/.config/vifm/scripts/imgt b/dotfiles/.config/vifm/scripts/imgt
deleted file mode 100755
index 5d76d5d..0000000
--- a/dotfiles/.config/vifm/scripts/imgt
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-#
-# Based on script by z3bra -- 2014-01-21
-
-W3MIMGDISPLAY="/usr/lib/w3m/w3mimgdisplay"
-FONTH=16 # Size of one terminal row
-FONTW=9 # Size of one terminal column
-
-X=$1
-Y=$2
-COLUMNS=$3
-LINES=$4
-FILENAME=$5
-
-read width height <<< `echo "5;$FILENAME" | $W3MIMGDISPLAY`
-if [ -z "$width" -o -z "$height" ]; then
- echo 'Error: Failed to obtain image size.'
- exit 1
-fi
-
-x=$((FONTW * X))
-y=$((FONTH * Y))
-
-max_width=$((FONTW * COLUMNS))
-max_height=$((FONTH * LINES))
-
-if [ "$width" -gt "$max_width" ]; then
- height=$((height * max_width / width))
- width=$max_width
-fi
-if [ "$height" -gt "$max_height" ]; then
- width=$((width * max_height / height))
- height=$max_height
-fi
-
-w3m_command="0;1;$x;$y;$width;$height;;;;;$FILENAME\n4;\n3;"
-
-echo -e "$w3m_command" | $W3MIMGDISPLAY
diff --git a/dotfiles/.config/vifm/scripts/vifmimg b/dotfiles/.config/vifm/scripts/vifmimg
deleted file mode 100755
index e5d8763..0000000
--- a/dotfiles/.config/vifm/scripts/vifmimg
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env bash
-readonly ID_PREVIEW="preview"
-
-#AUTO_REMOVE="yes"
-# By enabling this option the script will remove the preview file after it is drawn
-# and by doing so the preview will always be up-to-date with the file.
-# This however, requires more CPU and therefore affects the overall performance.
-
-if [ -e "$FIFO_UEBERZUG" ]; then
- if [[ "$1" == "draw" ]]; then
- declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW"
- [x]="$2" [y]="$3" [width]="$4" [height]="$5" \
- [path]="${PWD}/$6") \
- > "$FIFO_UEBERZUG"
-
- elif [[ "$1" == "videopreview" ]]; then
- echo -e "Loading preview..\nFile: $6"
- [[ ! -d "/tmp${PWD}/$6/" ]] && mkdir -p "/tmp${PWD}/$6/"
- [[ ! -f "/tmp${PWD}/$6.png" ]] && ffmpegthumbnailer -i "${PWD}/$6" -o "/tmp${PWD}/$6.png" -s 0 -q 10
- declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW"
- [x]="$2" [y]="$3" [width]="$4" [height]="$5" \
- [path]="/tmp${PWD}/$6.png") \
- > "$FIFO_UEBERZUG"
-
- elif [[ "$1" == "gifpreview" ]]; then
- echo -e "Loading preview..\nFile: $6"
- [[ ! -d "/tmp${PWD}/$6/" ]] && mkdir -p "/tmp${PWD}/$6/" && convert -coalesce "${PWD}/$6" "/tmp${PWD}/$6/$6.png"
- for frame in $(ls -1 /tmp${PWD}/$6/$6*.png | sort -V); do
- declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW"
- [x]="$2" [y]="$3" [width]="$4" [height]="$5" \
- [path]="$frame") \
- > "$FIFO_UEBERZUG"
- # Sleep between frames to make the animation smooth.
- sleep .07
- done
-
- elif [[ "$1" == "pdfpreview" ]]; then
- echo -e "Loading preview..\nFile: $6"
- [[ ! -d "/tmp${PWD}/$6/" ]] && mkdir -p "/tmp${PWD}/$6/"
- [[ ! -f "/tmp${PWD}/$6.png" ]] && pdftoppm -png -singlefile "$6" "/tmp${PWD}/$6"
- declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW"
- [x]="$2" [y]="$3" [width]="$4" [height]="$5" \
- [path]="/tmp${PWD}/$6.png") \
- > "$FIFO_UEBERZUG"
-
- elif [[ "$1" == "clear" ]]; then
- declare -p -A cmd=([action]=remove [identifier]="$ID_PREVIEW") \
- > "$FIFO_UEBERZUG"
- [[ ! -z $AUTO_REMOVE ]] && [[ -f "/tmp${PWD}/$6.png" ]] && rm -f "/tmp${PWD}/$6.png"
- [[ ! -z $AUTO_REMOVE ]] && [[ -d "/tmp${PWD}/$6/" ]] && rm -rf "/tmp${PWD}/$6/"
-
- fi
-fi
diff --git a/dotfiles/.config/vifm/scripts/vifmrun b/dotfiles/.config/vifm/scripts/vifmrun
deleted file mode 100755
index 9eda32a..0000000
--- a/dotfiles/.config/vifm/scripts/vifmrun
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-export FIFO_UEBERZUG="/tmp/vifm-ueberzug-${PPID}"
-
-function cleanup {
- rm "$FIFO_UEBERZUG" 2>/dev/null
- pkill -P $$ 2>/dev/null
-}
-
-rm "$FIFO_UEBERZUG" 2>/dev/null
-mkfifo "$FIFO_UEBERZUG"
-trap cleanup EXIT
-tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser bash &
-
-vifm
-cleanup