blob: 622aaf2c9aa58bafde493c4c5ab677a35a08970c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/usr/bin/env bash
readonly ID_PREVIEW="preview"
main() {
case "$1" in
"clear")
declare -p -A cmd=([action]=remove [identifier]="$ID_PREVIEW") \
> "$FIFO_UEBERZUG"
;;
"draw")
kitten icat --stdin no --transfer-mode memory --place"${5}x${6}@${3}x${4}" "$1" /dev/tty
#declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW" \
#[x]="$3" [y]="$4" [max_width]="$5" [max_height]="$6" \
#[path]="$2") > "$FIFO_UEBERZUG"
;;
"*") echo "Unknown command: '$1', '$2'" ;;
esac
}
main "$@"
|