>>107000645
>bash scripts so i can click a button on an aistudio codeblock and it gets moved into the proper filepath on my system
inotify-tools
does the heavy lifting, make it watch /Downloads/ folder and take action when a new file is downloaded that has the proper prefix
xclip for getting clipboard data
inotifywait -m -e close_write --format "%f" "$WATCH_DIR" | while read FILE; do
log_message "File detected: $FILE"
if [[ $FILE == ${PREFIX}* ]]; then
SRC="$WATCH_DIR/$FILE"
log_message "Processing file: $SRC"
CLIP=$(xclip -o -selection clipboard 2>/dev/null || echo "")
log_message "Clipboard content: '$CLIP'"
if [[ $CLIP =~ ^/[^[:space:]]+ ]]; then
CURRENT_PATH=$(validate_path "$CLIP")
if [[ $? -ne 0 ]]; then
log_message "Invalid path in clipboard, falling back to manual input"
else
log_message "Valid clipboard path: $CURRENT_PATH"