aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOxbian <got.dacs@slmail.me>2024-07-06 21:12:46 +0200
committerOxbian <got.dacs@slmail.me>2024-07-06 21:12:46 +0200
commit4d4310f1d31d5bb5b4dac81b6d34b478b197a9e6 (patch)
tree1563b929fe60ae8b7d9b227516a6f7f25f787d09
parent21a39dd1af87925e9ed113e6f95ba5c87c6409aa (diff)
downloadcsgo-flashbang-4d4310f1d31d5bb5b4dac81b6d34b478b197a9e6.tar.gz
csgo-flashbang-4d4310f1d31d5bb5b4dac81b6d34b478b197a9e6.zip
ADD: flashbang script + csgo flash soundmain
-rw-r--r--README.md11
-rw-r--r--csgo_flash.mp3bin0 -> 113493 bytes
-rwxr-xr-xflashbang.sh21
3 files changed, 30 insertions, 2 deletions
diff --git a/README.md b/README.md
index 14cb71f..4d3fb56 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,10 @@
-# flashbang
+# Flashbang
+---
-Recreate cs-go flashbang effect on your screen \ No newline at end of file
+A fun POSIX shell script for doing CS-GO flashbang on your screen.
+It just put your screen on full brightness for a second, pretty usefull for
+pranking your friend which use computer past midnight.
+
+## How to use it ?
+
+You'll need to have vlc installed, and just run the `flashbang.sh` script.
diff --git a/csgo_flash.mp3 b/csgo_flash.mp3
new file mode 100644
index 0000000..a454b27
--- /dev/null
+++ b/csgo_flash.mp3
Binary files differ
diff --git a/flashbang.sh b/flashbang.sh
new file mode 100755
index 0000000..6db7b93
--- /dev/null
+++ b/flashbang.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+# Script pour faire une flashbang avec le pc
+
+AUDIO_FILEPATH="$(pwd)/csgo_flash.mp3"
+CUR_BACKLIGHT=$(xbacklight -get)
+
+cvlc --no-video "$AUDIO_FILEPATH" &
+sleep 1.5
+
+xbacklight -set 100
+while [ "$(xbacklight -get)" -gt "$CUR_BACKLIGHT" ]
+do
+ xbacklight -dec 5
+ # Vérifier si la nouvelle luminosité est inférieure à la luminosité cible
+ if [ "$(xbacklight -get)" -lt "$CUR_BACKLIGHT" ]; then
+ xbacklight -set "$CUR_BACKLIGHT"
+ fi
+
+ # Attendre 100ms
+ sleep 0.25
+done
ArKa projects. All rights to me, and your next child right arm.