. $HOME/.config/environment

numlockx on

setxkbmap de
setxkbmap -option caps:none


_autostart_workspace_voip()
{
    #/opt/teamspeak5/TeamSpeak &
    #sleep 2
    #alacritty --class "mail" --command sh -c "neomutt" &
    teamspeak3 &
    sleep 1
    element-desktop &
    sleep 1
    discord &
}

_autostart_workspace_messenger()
{
    signal-desktop &
    sleep 1
    thunderbird &
}

_autostart_apps()
{
    dunst &
    ckb-next --background &
    parcellite &
    solaar --window hide &

    conky --daemonize --config="$HOME/.config/conky/clock.conf"
    conky --daemonize --config="$HOME/.config/conky/system.conf"
    conky --daemonize --config="$HOME/.config/conky/archlinux-updates.conf"

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

    syncthing -no-browser &
    /usr/lib/kdeconnectd &
    #transmission-gtk --minimized &
    qbittorrent &

    #steam-runtime -silent -tcp &
    flatpak run com.valvesoftware.Steam -silent &
    qutebrowser &

    mopidy &

    /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
    systemctl --user start spotifyd.service &
}

_autostart()
{
    ### wait for audio
    #start_jack
    start_audio pipewire

    ### wait for internet
    wait_for_service "network-online.target"

    pass x
    (pass notes/keepass | head -n 1 | keepassxc --pw-stdin ~/sync/passwords.kdbx) &

    _autostart_apps &
    _autostart_workspace_voip &
    _autostart_workspace_messenger &
}

_autostart &

# vim: ft=sh