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

#xcompmgr -c -r0 &
picom &
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 -b &
    parcellite &

    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 -g -c ~/.config/actkbd/actkbd.conf -d /dev/input/by-id/usb-Dell_Dell_USB_Keyboard-event-kbd &

    /usr/lib/kdeconnectd &
    transmission-gtk -m &
    steam-runtime -silent -tcp &
    env GTK_THEME=Adwaita:light firefox &

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

    mopidy &
    ympd --webport 54594 &
}

_autostart_on_launch &

# vim: ft=sh