Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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