Replies: 1 comment 1 reply
-
yes, you can start conky first: #!/bin/bash
# Start conky and capture its PID
conky &
CONKY_PID=$!
# Function to clean up on exit
cleanup() {
echo "Stopping conky (PID: $CONKY_PID)..."
kill "$CONKY_PID" 2>/dev/null
exit
}
# Set trap to ensure cleanup on exit or interrupt
trap cleanup EXIT INT TERM
# Monitor ~/todo.txt for changes
echo "Monitoring ~/todo.txt for changes..."
while inotifywait --event modify ~/todo.txt; do
echo "File changed, sending signal to conky..."
kill -SIGHUP "$CONKY_PID"
done I was thinking about adding fsnotify functionality directly to conky, but I guess this works for now. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I came up with the following logic to have conky update instantly on a file change
however conky won't start before the file is modified. Is there a way to tell conky to start before script executed the first time, so at least other things are shown?
Beta Was this translation helpful? Give feedback.
All reactions