diff --git a/bin/autostart.py b/bin/autostart.py new file mode 100755 index 0000000..5860e63 --- /dev/null +++ b/bin/autostart.py @@ -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) diff --git a/dotfiles/config/i3/config b/dotfiles/config/i3/config index 72666ea..4faa5ad 100644 --- a/dotfiles/config/i3/config +++ b/dotfiles/config/i3/config @@ -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