• 0 Posts
  • 15 Comments
Joined 2 years ago
cake
Cake day: June 17th, 2023

help-circle






  • OP seemed like they didn’t know where to start, so linking programs together was my suggestion. With a rough example. If thats against etiquette the noted.

    As for helpfulness, where are the code block entries. I have preview, hyperlink, inage, bold, italic,quotes,lists and spoilers across the bottom, and no codeblock.

    As for Wayland compatible this is where, somebody reads between the lines. If those two aren’t Wayland compatible search for Wayland compatible tool like “xxxxxx”.




  • Chatgt says build a scrip using a few tools. xdotool and scrot. I don’t know if this code is good or not. And some hashes are making markdown headers. How do we paste code on here?

    #!/bin/bash

    Set interval (in seconds)

    INTERVAL=10

    Output directories

    LOG_FILE=“$HOME/window_log.txt” IMG_DIR=“$HOME/window_snaps” mkdir -p “$IMG_DIR”

    while true; do # Get timestamp TS=$(date “+%Y-%m-%d_%H-%M-%S”)

    # Get active window title
    TITLE=$(xdotool getactivewindow getwindowname 2>/dev/null)
    
    # Fallback if title is empty
    if [ -z "$TITLE" ]; then
        TITLE="(No active window)"
    fi
    
    # Take screenshot
    IMG_FILE="$IMG_DIR/snap_$TS.png"
    scrot "$IMG_FILE"
    
    # Log entry
    echo "$TS | $TITLE" >> "$LOG_FILE"
    
    # Wait before next iteration
    sleep $INTERVAL
    

    done