[ -f "$HOME/.config/user-dirs.dirs" ] && source $HOME/.config/user-dirs.dirs
source $HOME/.config/environment

xcompmgr -n -f -D3 &
numlockx on

setxkbmap de
setxkbmap -option caps:none


if [ -x "$(command -v gpgconf)" ]
then
    export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
    gpgconf --launch gpg-agent
fi

_autostart_on_launch()
{
    dunst &
    ckb-next --background &
    parcellite &
    solaar --window hide &
    xrandr --output HDMI-1 --mode 2560x1440 --refresh 144

    conky --daemonize --config="$HOME/.config/conky/clock.conf"
    conky --daemonize --config="$HOME/.config/conky/cpu_ram_storage.conf"
    feh --bg-fill $XDG_PICTURES_DIR/wallpaper/active_wallpaper

    sleep 8

    syncthing -no-browser &

    actkbd --grab --config ~/.config/actkbd/actkbd.conf --device /dev/input/by-id/usb-Dell_Dell_USB_Keyboard-event-kbd &

    /usr/lib/kdeconnectd &
    transmission-gtk --minimized &
    steam-runtime -silent -tcp &
    qutebrowser &

    start_jack
    sleep 1
    teamspeak3 &
    sleep 2
    alacritty --class "mail" --command sh -c "neomutt" &
    sleep 1
    element-desktop &
    sleep 1
    bspc node "@voip:/first" -f
    xdg-open "steam://open/friends/"

    mopidy &
}

_autostart_on_launch &

# vim: ft=sh