~botevmg/unity-mail/gmailThread

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python3
# Unity Mail, QuickList URL processor
# Author: Dmitry Shachnev <mitya57@gmail.com>
# License: GNU GPL 3 or higher; http://www.gnu.org/licenses/gpl.html

import os.path
import sys

from UnityMail.config import *

if (os.path.exists('/usr/share/unity-mail/unity-mail-autostart.desktop') and
not os.path.exists(config_dir+'/autostart/unity-mail-autostart.desktop')):
	# First run of Unity Mail, open um-config
	subprocess.call('um-config')
elif len(sys.argv) > 1:
	open_url_or_command(sys.argv[1])
else:
	print('Error: please specify URL name.')
	print_names()
	sys.exit(1)