From 984717a83371b5fd9b9a8edb83aab111ef1c77eb Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Tue, 6 Aug 2019 04:32:47 +0000 Subject: [PATCH] Add waifu2x zsh function --- home/.zshrc.docker | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/home/.zshrc.docker b/home/.zshrc.docker index 1bdeb69..c1932c4 100644 --- a/home/.zshrc.docker +++ b/home/.zshrc.docker @@ -34,3 +34,19 @@ function unrar () { r.sbruder.de/unrar \ $@ } + +function waifu2x() { + docker run \ + --rm \ + -t \ + -v "$PWD:/data" \ + -w /data \ + -v "$HOME/.waifu2x:/home/waifu2x/.waifu2x" \ + -e HOME=/home/waifu2x \ + -u $(id -u) \ + --group-add $(getent group video|cut -d: -f3) \ + --group-add $(getent group render|cut -d: -f3) \ + --device /dev/dri \ + r.sbruder.de/waifu2x-converter-cpp \ + $@ +}