From 85597e7ba017edfc4068eee37732a17e74f3176b Mon Sep 17 00:00:00 2001 From: David Runge Date: Sun, 7 Jul 2019 13:57:04 +0200 Subject: .zsh.after/aliases.zsh: Setting mpv alias depending on whether on Xwayland or X11. --- .zsh.after/aliases.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.zsh.after/aliases.zsh b/.zsh.after/aliases.zsh index 413dd3b..ffd829b 100644 --- a/.zsh.after/aliases.zsh +++ b/.zsh.after/aliases.zsh @@ -37,7 +37,11 @@ for index ({1..9}) alias "$index"="cd +${index}"; unset index #MPLAYER alias mplayer='mplayer -ao jack,pulse,alsa' -alias mpv='mpv -ao jack,pulse,alsa --sub-auto=fuzzy' +if pgrep Xwayland > /dev/null; then + alias mpv='mpv --audio-channels=stereo --gpu-context=wayland -ao jack,pulse,alsa --sub-auto=fuzzy' +else + alias mpv='mpv --audio-channels=stereo -ao jack,pulse,alsa --sub-auto=fuzzy' +fi if [[ "$VENDOR" == "apple" ]]; then alias mpv='mpv --sub-auto=fuzzy' fi -- cgit v1.2.3-70-g09d2