-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.sh
More file actions
67 lines (57 loc) · 1.91 KB
/
Copy pathmain.sh
File metadata and controls
67 lines (57 loc) · 1.91 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
echo "⚠️ WARNING: This script creates screen flickering effects."
echo "⚠️ Do not use if you have photosensitive epilepsy or similar conditions."
echo "⚠️ Press Ctrl+C or close the window to exit immediately."
echo ""
read -p "Do you want to continue? (yes/no): " confirm
if [[ "$confirm" != "yes" ]]; then
echo "Exiting safely."
exit 0
fi
# Function to clean up on exit
cleanup() {
echo -e "\nRestoring normal display..."
# Reset terminal colors
echo -e "\033[0m"
# Reset cursor
printf '\033[?12l\033[?25h'
exit 0
}
trap cleanup SIGINT SIGTERM
echo "Starting visual effect... Press Ctrl+C to exit at any time."
# Create flickering effect
while true; do
# Alternate between black and white
for i in {0..1}; do
# Set background and foreground colors
if [[ $i -eq 0 ]]; then
# White on black
printf '\033[0;40;37m'
else
# Black on white
printf '\033[0;47;30m'
fi
# Clear screen with current colors
clear
# Create opposite cursor effect (blinking block cursor)
if [[ $i -eq 0 ]]; then
printf '\033[?12h' # Steady block cursor (less flicker)
else
printf '\033[?12l' # Hide cursor temporarily
fi
# Display instructions
echo "========================================"
echo "Visual Effect Demo - SAFE VERSION"
echo "========================================"
echo ""
echo "Effect: Screen color alternation"
echo "Status: Press Ctrl+C to exit"
echo ""
echo "⚠️ This is a simulated effect only."
echo "⚠️ No actual screen flickering occurs."
echo "⚠️ Limited for safety reasons."
echo "========================================"
# Slow, safe delay
sleep 0.5
done
done