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)

View File

@@ -130,7 +130,7 @@ bindsym $mod+l exec i3lock -c 000000 -d && xset dpms force off
bindsym $alt+Control+l exec i3lock -c 000000 -d && xset dpms force off
# things to start quickly
bindsym $mod+g exec /usr/bin/google-chrome-beta
bindsym $mod+g exec /usr/bin/google-chrome-beta --password-store=gnome
# kill a window with middle click + mod
bindsym --whole-window $mod+button2 kill
@@ -142,6 +142,7 @@ exec --no-startup-id /usr/bin/cinnamon-settings-daemon &
exec --no-startup-id gnome-keyring-daemon --start --components=pkcs11,secrets
exec --no-startup-id (sleep 2; nm-applet) &
exec --no-startup-id xset r rate 200 20
exec --no-startup-id ~/bin/autostart.py
# customize windows
for_window [class="^google-chrome$"] border pixel