mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
kdrive: wait for an internet connection before attempting to mount
This commit is contained in:
@@ -218,7 +218,7 @@ in {
|
|||||||
"swww img ${wallpaper}"
|
"swww img ${wallpaper}"
|
||||||
"swww-daemon"
|
"swww-daemon"
|
||||||
"sleep 1 && custom-wallpaper"
|
"sleep 1 && custom-wallpaper"
|
||||||
"sleep 5 && custom-checkKdrive && custom-mountkdrive" # checks if the remote works and mount it
|
"custom-checkKdrive && custom-mountkdrive" # checks if the remote works and mount it
|
||||||
#"waybar"
|
#"waybar"
|
||||||
"custom-gitnotify"
|
"custom-gitnotify"
|
||||||
"custom-checkMatrix" # checks if matrix-commander-rs is connected which is important for other stuff
|
"custom-checkMatrix" # checks if matrix-commander-rs is connected which is important for other stuff
|
||||||
|
|||||||
@@ -13,6 +13,14 @@ writeShellApplication {
|
|||||||
libnotify
|
libnotify
|
||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
|
|
||||||
|
# waits for an internet connection. It pings both Google DNS and Cloudfare dns in case one of them is down
|
||||||
|
until ping -c1 -W1 1.1.1.1 >/dev/null 2>&1 || \
|
||||||
|
ping -c1 -W1 8.8.8.8 >/dev/null 2>&1
|
||||||
|
do
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
output=$(rclone lsd kdrive: 2>&1)
|
output=$(rclone lsd kdrive: 2>&1)
|
||||||
|
|||||||
Reference in New Issue
Block a user