#!/bin/sh
# This script executes only at the start/restart of the desktop server.
# Another start script (/usr/bin/conkyrestart) is called by conky-gtk,
# icon_switcher, and frontend_rox_funcs when mounting/unmounting drives.

BPS=$(busybox ps)
echo "$BPS" | grep -q 'ROX-Filer -p' && ROX_DESKTOP=yes
[ "$ROX_DESKTOP" = "yes" ] && PAUSE="sleep 10" || PAUSE="sleep 5" # provide extra time for ROX desktop drive icons to appear before calling conky
#gtkdialog-splash -close never -timeout 5 -margin 10 -placement center -fontsize large -bg goldenrod -text " $(gettext 'Starting Conky...') " &
$PAUSE
wallp=$(cat "$HOME/.config/wallpaper/bg_img")
conky -c "$HOME/.config/conky-gtk/conkyrc" 2>/dev/null &
sleep 2
set_bg "$wallp" &
