#!/bin/bash

# Run all system xinitrc shell scripts
xinitdir="/etc/X11/xinit/xinitrc.d"
if [ -d "$xinitdir" ]; then
    for script in $xinitdir/*; do
        echo "Loading xinit script $script"
        if [ -x "$script" -a ! -d "$script" ]; then
            . "$script"
        fi
    done
fi

# Source generic xprofile stuff
source "$(dirname "${BASH_SOURCE[0]}")/xprofile"

# Start the gnome-keyring if it's installed
if exists gnome-keyring-daemon; then
    export $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh,gnupg)
fi

exec i3
