#!/bin/sh
# XDG autostart launcher for the aptosid conky panel.
# Prefers ~/.config/conky/conky.conf; skips if conky already running.

command -v conky >/dev/null 2>&1 || exit 0
pgrep -x conky >/dev/null 2>&1 && exit 0

user_conf="${XDG_CONFIG_HOME:-$HOME/.config}/conky/conky.conf"
if [ -r "$user_conf" ]; then
    exec conky
fi

if [ -n "$WAYLAND_DISPLAY" ]; then
    exec conky -c /usr/share/aptosid-settings-conky/conky-wayland.conf
fi
exec conky -c /usr/share/aptosid-settings-conky/conky-x11.conf
