zsh: Add aegisub docker function

This commit is contained in:
Simon Bruder 2020-04-24 21:08:56 +00:00
parent 38b6ae0124
commit f5fdcb0eee
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F

View file

@ -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 \
$@
}