From 4c744f6c96499a62ad015ba808accc4a0b4e1f6d Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 26 Mar 2020 13:09:48 +0100 Subject: Added network check --- .scripts/code | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to '.scripts/code') diff --git a/.scripts/code b/.scripts/code index 422b0ef..4dd38b3 100755 --- a/.scripts/code +++ b/.scripts/code @@ -1,7 +1,11 @@ #!/usr/bin/env sh +notify-send -u critical "Waiting for internet connection..." +while ! ping -qc1 8.8.8.8 ; do sleep 0.1 ; done +notify-send -u critical "Found network!" + exec qutebrowser & -exec st -e nvim /home/melvin/code/melvix/ & +exec st & exec telegram-desktop & exec signal-desktop & @@ -10,6 +14,8 @@ exec whatsapp-nativefier-dark & exec spotify & -sleep 0.5 +sleep 1 + +dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play -dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play & +notify-send -u critical "Welcome back, Melvin!" -- cgit v1.2.3