Run autostart .desktop files on i3 login.

This commit is contained in:
David Tomaschik
2017-04-13 21:13:47 -07:00
parent 9018536732
commit 12dd58dc01
2 changed files with 18 additions and 1 deletions

16
bin/autostart.py Executable file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/python
"""
Launch desktop files from ~/.config/autostart
"""
import glob
import os.path
from gi.repository import Gio
dirname = os.path.expanduser('~/.config/autostart')
for desktop in glob.glob(os.path.join(dirname, '*.desktop')):
try:
fp = Gio.DesktopAppInfo.new_from_filename(desktop)
except TypeError:
continue
fp.launch_uris([], None)