Fix quoting
Do not stop on first discovered detected profile
Add support for a global postswitch file
Fix xrandr -q parsing when output contains "primary"

xRandR (in newer versions?) will output an extra columns for primary outputs.
Detect this column and modify the string split and column numbers accordingly.