Improve startup routine

This commit is contained in:
Tobias Reisinger 2021-07-10 00:52:56 +02:00
parent f3fcf94db6
commit d419ca351c
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE

View file

@ -25,6 +25,50 @@ fi
# #xrandr --output HDMI-2 --left-of eDP-1 --auto # #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() _autostart_defaults()
{ {
dunst & dunst &
@ -33,46 +77,31 @@ _autostart_defaults()
solaar --window hide & solaar --window hide &
sxhkd & 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/clock.conf"
conky --daemonize --config="$HOME/.config/conky/system.conf" conky --daemonize --config="$HOME/.config/conky/system.conf"
conky --daemonize --config="$HOME/.config/conky/archlinux-updates.conf" conky --daemonize --config="$HOME/.config/conky/archlinux-updates.conf"
feh --bg-fill $XDG_PICTURES_DIR/wallpaper/active_wallpaper 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 & #actkbd --grab --config ~/.config/actkbd/actkbd.conf --device /dev/input/by-id/usb-Dell_Dell_USB_Keyboard-event-kbd &
}
/usr/lib/kdeconnectd & _autostart()
#transmission-gtk --minimized & {
qbittorrent & _autostart_defaults &
#steam-runtime -silent -tcp &
flatpak run com.valvesoftware.Steam -silent &
qutebrowser &
sleep 1 ### wait for internet
wait_for_service "network-online.target"
_autostart_webapps &
### Workspace VOIP ### wait for audio
teamspeak3 & wait_for_service "--user pulseaudio.socket"
#/opt/teamspeak5/TeamSpeak & start_jack
#sleep 2
#alacritty --class "mail" --command sh -c "neomutt" &
sleep 1
element-desktop &
### Workspace Messenger _autostart_audioapps &
signal-desktop &
sleep 1
thunderbird &
mopidy & _autostart_workspace_voip &
_autostart_workspace_messenger &
} }
host_name=$(cat /proc/sys/kernel/hostname) host_name=$(cat /proc/sys/kernel/hostname)
@ -82,6 +111,6 @@ elif [[ $host_name == *"laptop"* ]]; then
_autostart_laptop & _autostart_laptop &
fi fi
_autostart_defaults & _autostart &
# vim: ft=sh # vim: ft=sh