From f9470b2190d41d7c0e182e4fb4c389da9d8f70e0 Mon Sep 17 00:00:00 2001 From: kemi Date: Sun, 14 Dec 2025 12:23:09 +0000 Subject: [PATCH] =?UTF-8?q?conky.start.stop=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conky.start.stop | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 conky.start.stop diff --git a/conky.start.stop b/conky.start.stop new file mode 100644 index 0000000..40723aa --- /dev/null +++ b/conky.start.stop @@ -0,0 +1,16 @@ +#!/bin/bash + +# Define both Conky commands +CONKY_CMD1="/usr/bin/conky -c /home/kemi/APPS/conky/left.side.conky.conf -p 1" +CONKY_CMD2="/usr/bin/conky -c /home/kemi/APPS/conky/right.side.conky.conf -p 1" + +# Check if Conky is running +if pgrep -x "conky" > /dev/null; then + echo "Conky is running — stopping it..." + pkill -x conky +else + echo "Conky is not running — starting it..." + $CONKY_CMD1 & + sleep 1 # small delay to avoid race conditions + $CONKY_CMD2 & +fi \ No newline at end of file