Skip to content

Instantly share code, notes, and snippets.

@juanfgs
Created August 12, 2015 13:43
Show Gist options
  • Save juanfgs/e70f41fae4a8552d32e8 to your computer and use it in GitHub Desktop.
Save juanfgs/e70f41fae4a8552d32e8 to your computer and use it in GitHub Desktop.
Set Wallpaper
#!/bin/sh
cd .;
ffmpeg -i $1 -vcodec copy -acodec copy temp.mkv;
CHARSET=`file -bi $2 | sed -e 's/.*[ ]charset=//'`;
if [ $CHARSET == "utf-8" ];then
cp $2 subtitle.srt;
else
iconv -f iso8859-15 -t UTF-8 $2 > subtitle.srt;
fi
mkvmerge -o $1.mkv temp.mkv --language "0:es" --track-name "0:mytrackname" -s 0 -D -A subtitle.srt;
rm temp.mkv
rm subtitle.srt
#!/bin/bash
zenity --file-selection --title="Select Wallpaper"|xargs fbsetbg -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment