.dotfiles/.xprofile

120 lines
2.5 KiB
Bash

. $HOME/.config/environment
numlockx on
setxkbmap de
setxkbmap -option caps:none
if [ -x "$(command -v gpgconf)" ]
then
ssh_sock=$(gpgconf --list-dirs agent-ssh-socket)
export SSH_AUTH_SOCK="$ssh_sock"
gpgconf --launch gpg-agent
gpg2 --card-status > /dev/null
fi
network_wait_pid=1
audio_wait_pid=1
wait_for_service()
{
until systemctl is-active --quiet "$1"
do
sleep 0.5
done
}
wait_for_user_service()
{
until systemctl --user is-active --quiet "$1"
do
sleep 0.5
done
}
_autostart_audio()
{
wait_for_user_service "pipewire.service"
wait_for_user_service "wireplumber.service"
sleep 5
pw-link 'default-sink:monitor_FL' 'alsa_output.usb-BEHRINGER_UMC202HD_192k-00.analog-stereo:playback_FL'
pw-link 'default-sink:monitor_FR' 'alsa_output.usb-BEHRINGER_UMC202HD_192k-00.analog-stereo:playback_FR'
pw-link 'default-sink:monitor_FL' 'alsa_output.pci-0000_00_1f.3.analog-stereo:playback_FL'
pw-link 'default-sink:monitor_FR' 'alsa_output.pci-0000_00_1f.3.analog-stereo:playback_FR'
}
_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 &
wait $network_wait_pid
syncthing -no-browser &
/usr/lib/kdeconnectd &
#transmission-gtk --minimized &
qbittorrent &
wait $audio_wait_pid
#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
_autostart_audio
### 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