Last active
March 24, 2019 04:33
-
-
Save whoizit/ee6fe17673bae63f17cbdca5c611e9c0 to your computer and use it in GitHub Desktop.
mpv #351 workaround https://github.com/mpv-player/mpv/issues/351
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://github.com/mpv-player/mpv/issues/351 | |
# set this option in config: | |
# title=mpv351: ${filename} | |
# requirements: | |
# https://github.com/baskerville/xtitle | |
# https://github.com/ierton/xkb-switch | |
prev_title=0 | |
while read -r x; do | |
case "$x" in | |
*mpv351*) | |
prev_title=mpv | |
saved_layout=$(xkb-switch) | |
xkb-switch -s us | |
;; | |
*) | |
[ "$prev_title" == "mpv" ] && xkb-switch -s $saved_layout | |
prev_title="$x" | |
;; | |
esac | |
done < <(xtitle -s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment