diff --git a/home/.zshrc.docker b/home/.zshrc.docker index 0e06f9c..fa9d8b9 100644 --- a/home/.zshrc.docker +++ b/home/.zshrc.docker @@ -113,3 +113,24 @@ function yuuno() { r.sbruder.de/vapoursynth \ jupyter notebook --ip 0.0.0.0 --port 8087 } + +function aegisub() { + docker run \ + --rm \ + -it \ + --device /dev/dri \ + --group-add $(getent group video|cut -d: -f3) \ + --group-add $(getent group video|cut -d: -f3) \ + -e DISPLAY \ + -e PULSE_COOKIE=/run/pulse/cookie \ + -e PULSE_SERVER=/run/user/$(id -u)/pulse/native \ + -u $(id -u) \ + -v $HOME/.aegisub/:/home/aegisub/.aegisub/ \ + -v $HOME/.config/pulse/cookie:/run/pulse/cookie \ + -v $HOME/.fonts/:/home/aegisub/.fonts/ \ + -v $PWD:/home/aegisub/data/ \ + -v /run/user/$(id -u)/pulse/native:/run/user/$(id -u)/pulse/native \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + r.sbruder.de/aegisub \ + $@ +}