From 4a8880bc2d3479b3584db7b83038a1247190f781 Mon Sep 17 00:00:00 2001
From: Xarus <xarus.0r4jw@simplelogin.fr>
Date: Mon, 11 Sep 2023 15:18:15 +0200
Subject: [PATCH] add new pranks & new setup system

---
 kill_term.sh     |  7 +++++++
 random_jump.sh   |  5 +++++
 rotate_screen.sh | 10 ++++++++++
 setup.sh         | 11 +++++++++++
 sleep.sh         |  5 +++++
 tchoutchou.sh    |  1 +
 6 files changed, 39 insertions(+)
 create mode 100755 kill_term.sh
 create mode 100755 random_jump.sh
 create mode 100755 rotate_screen.sh
 create mode 100755 setup.sh
 create mode 100755 sleep.sh
 create mode 100755 tchoutchou.sh

diff --git a/kill_term.sh b/kill_term.sh
new file mode 100755
index 0000000..12641e9
--- /dev/null
+++ b/kill_term.sh
@@ -0,0 +1,7 @@
+PROCESS=$$
+
+(
+	sleep 30s
+	kill -9 $PROCESS
+) &
+
diff --git a/random_jump.sh b/random_jump.sh
new file mode 100755
index 0000000..e3c5ae0
--- /dev/null
+++ b/random_jump.sh
@@ -0,0 +1,5 @@
+rcd(){
+	cd $(find $1 -maxdepth 3 -type d | shuf | head -n 1)
+}
+
+alias cd="rcd"
diff --git a/rotate_screen.sh b/rotate_screen.sh
new file mode 100755
index 0000000..c034452
--- /dev/null
+++ b/rotate_screen.sh
@@ -0,0 +1,10 @@
+SCREEN=$(xrandr -q | sed -n "s/^\(.*\) connected .*$/\1/p" | head -n 1)
+(
+while true
+do
+	sleep 60s
+	xrandr --output $SCREEN --rotate inverted
+	sleep 10s
+	xrandr --output $SCREEN --rotate normal
+done
+) &
diff --git a/setup.sh b/setup.sh
new file mode 100755
index 0000000..b9d6c3c
--- /dev/null
+++ b/setup.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/bash
+
+declare -A pranks
+pranks[0]="tchoutchou"
+pranks[1]="sleep"
+pranks[2]="rotate_screen"
+pranks[3]="kill_term"
+pranks[4]="random_jump"
+
+cat ./${pranks[$[ $RANDOM % 5 ]]}.sh >> ~/.bashrc
+
diff --git a/sleep.sh b/sleep.sh
new file mode 100755
index 0000000..afb2e9b
--- /dev/null
+++ b/sleep.sh
@@ -0,0 +1,5 @@
+sleep 10s
+echo 'Verouille ta session la prochaine fois !'
+sleep 10s
+echo '(vim .bashrc)'
+sleep 10s
diff --git a/tchoutchou.sh b/tchoutchou.sh
new file mode 100755
index 0000000..1aa8d05
--- /dev/null
+++ b/tchoutchou.sh
@@ -0,0 +1 @@
+sl -a
-- 
GitLab