bump version to 0.5.0
slight simplification for command list iteration
Add X11 option
move duplicate code into separate function
move some code inside _X11 ifdef
Merge pull request #236 from s3erios/master

Some code simplification
Merge pull request #235 from s3erios/master_cfg

Add X11 option
Merge pull request #238 from Ansa89/trivial-fix

Addition to Tox/toxic#235