-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimulate-active-session.sh
More file actions
executable file
·52 lines (46 loc) · 1.14 KB
/
simulate-active-session.sh
File metadata and controls
executable file
·52 lines (46 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
# Simulates an active Claude session by updating the timestamp every 2 seconds
# Create session directory if it doesn't exist
mkdir -p "$HOME/.claude_sessions"
SESSION_FILE="$HOME/.claude_sessions/claude-status--Users-caseyjones-homedev-claude-sessions.json"
echo "Simulating active Claude session..."
echo "Press Ctrl+C to stop"
echo ""
while true; do
# Get current timestamp in milliseconds
timestamp=$(date +%s)000
# Update the JSON file with new timestamp
cat > "$SESSION_FILE" << EOF
{
"session_id": "session-abc123",
"cwd": "/Users/caseyjones/homedev/claude-sessions",
"model": {
"display_name": "Sonnet 4.5",
"id": "claude-sonnet-4-20250514"
},
"context_window": {
"used_percentage": 35.5,
"max_tokens": 200000
},
"token_usage": {
"input": 45000,
"output": 26000
},
"cost": {
"total": 0.23,
"input": 0.135,
"output": 0.095
},
"duration": {
"total_seconds": 4980
},
"code_impact": {
"lines_added": 1200,
"lines_removed": 350
},
"_statusline_update_time": $timestamp
}
EOF
echo "Updated session at $(date '+%H:%M:%S')"
sleep 2
done