{
	"service": "vpn",
	"type": "proton",
	"description": "Setup VPN for Proton",
	"steps" :
	[
		"VPNLIST='jp-free-01.protonvpn.net.udp.ovpn nl-free-01.protonvpn.net.udp.ovpn us-free-01.protonvpn.net.udp.ovpn'",
		"VPNRND=$[ $RANDOM % 3 + 1 ]",
		"VPNCFG=$(echo $VPNLIST | cut -d' ' -f $VPNRND)",
		"echo Using ProtonVPN: $VPNCFG",
		"sudo openvpn --config work/ddrive/PDrive/ProtonVPN/$VPNCFG"
	]
}
{
	"service": "home",
	"type": "t",
	"description": "Open preconfigured terminal windows for home operations",
	"steps" :
	[
		"wt.exe -w 0 powershell -noexit -command \"cd c:\\work\"",
		"sleep 1",
		"wt.exe -w 0 powershell -noexit -command \"cd c:\\work\\home\""
	]
}
{
	"service": "home",
	"type": "apps",
	"description": "Run all the home apps",
	"steps" :
	[
		"if ( Get-Process firefox -ErrorAction SilentlyContinue -ErrorVariable ProcessError ) { write-host \"firefox already running\" } else { & \"C:\\Program Files\\Mozilla Firefox\\firefox.exe\" } ",
		"sleep 2",
		"if ( Get-Process thunderbird -ErrorAction SilentlyContinue -ErrorVariable ProcessError ) { write-host \"thunderbird already running\" } else { & \"C:\\Program Files\\Mozilla Thunderbird\\thunderbird.exe\" } ",
		"sleep 2",
		"if ( [bool](Get-Process Code -ErrorAction SilentlyContinue -ErrorVariable ProcessError ) -And $FORCEIT -eq 0 ) { write-host \"visual studio code already running\" } else { & \"C:\\Users\\theod\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" } ",
		"sleep 2",
		"if ( Get-Process cherrytree -ErrorAction SilentlyContinue -ErrorVariable ProcessError ) { write-host \"cherrytree already running\" } else { & \"C:\\Program Files\\CherryTree\\mingw64\\bin\\cherrytree.exe\" } ",
		"sleep 2",
		"echo \"Home Apps Started at $(date)\""
	]


}
{
	"service": "work",
	"type": "apps",
	"description": "Run all the work apps",
	"steps" :
	[
		"#if ( Get-Process upm -ErrorAction SilentlyContinue -ErrorVariable ProcessError ) { write-host \"upm already running\" } else { & \"C:\\Program Files (x86)\\UPM\\upm.bat\" } ",
		"#sleep 2",
		"if ( [bool](Get-Process sublime_text -ErrorAction SilentlyContinue -ErrorVariable ProcessError) -And $FORCEIT -eq 0 ) { write-host \"sublime already running\" } else { & \"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\" } ",
		"sleep 2",
		"if ( Get-Process chrome -ErrorAction SilentlyContinue -ErrorVariable ProcessError ) { write-host \"Chrome already running\" } else { & \"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" } ",
		"sleep 2",
		"if ( Get-Process zim -ErrorAction SilentlyContinue -ErrorVariable ProcessError ) { write-host \"Zim already running\" } else { & \"C:\\Program Files\\Zim Desktop Wiki\\zim.exe\" } ",
		"echo \"Work Apps Started at $(date)\""
	]
}
{
	"service": "work",
	"type": "t",
	"description": "Open preconfigured terminal windows for work operations",
	"steps" :
	[
		"& \"C:\\Program Files\\Git\\git-bash.exe\" --cd-to-home",
		"sleep 1"
	]
}