diff --git a/.xprofile b/.xprofile index 4110540..4f8453b 100644 --- a/.xprofile +++ b/.xprofile @@ -25,6 +25,50 @@ fi # #xrandr --output HDMI-2 --left-of eDP-1 --auto #} +wait_for_service() +{ + until systemctl is-active --quiet $1 + do + sleep 0.5 + done +} + +_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_webapps() +{ + syncthing -no-browser & + /usr/lib/kdeconnectd & + #transmission-gtk --minimized & + qbittorrent & +} + +_autostart_audioapps() +{ + #steam-runtime -silent -tcp & + flatpak run com.valvesoftware.Steam -silent & + qutebrowser & + + mopidy & +} + _autostart_defaults() { dunst & @@ -33,46 +77,31 @@ _autostart_defaults() solaar --window hide & sxhkd & - $HOME/.config/bspwm/swallow.py & - $HOME/.config/bspwm/focus-voip.py & 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" feh --bg-fill $XDG_PICTURES_DIR/wallpaper/active_wallpaper - ### wait for internet and audio - sleep 10 - start_jack - sleep 2 - - 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 & - qbittorrent & - #steam-runtime -silent -tcp & - flatpak run com.valvesoftware.Steam -silent & - qutebrowser & +_autostart() +{ + _autostart_defaults & - sleep 1 + ### wait for internet + wait_for_service "network-online.target" + _autostart_webapps & - ### Workspace VOIP - teamspeak3 & - #/opt/teamspeak5/TeamSpeak & - #sleep 2 - #alacritty --class "mail" --command sh -c "neomutt" & - sleep 1 - element-desktop & + ### wait for audio + wait_for_service "--user pulseaudio.socket" + start_jack - ### Workspace Messenger - signal-desktop & - sleep 1 - thunderbird & + _autostart_audioapps & - mopidy & + _autostart_workspace_voip & + _autostart_workspace_messenger & } host_name=$(cat /proc/sys/kernel/hostname) @@ -82,6 +111,6 @@ elif [[ $host_name == *"laptop"* ]]; then _autostart_laptop & fi -_autostart_defaults & +_autostart & # vim: ft=sh