Skip to content

Instantly share code, notes, and snippets.

@juanfgs
Created August 12, 2015 13:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
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