This commit is contained in:
JOLIMAITRE Matthieu 2024-06-18 04:25:02 +02:00
parent ad4543a58e
commit be9a92abb6
7 changed files with 26 additions and 14 deletions

16
data/home/.machine_conf Normal file
View file

@ -0,0 +1,16 @@
#!/bin/sh
# seeding rng
RANDOM="2$(hostname | sum | cut -f 1 -d ' ')"
# rng function
function random_from {
declare -a array=("$@")
r=$((RANDOM % ${#array[@]}))
printf "%s\n" "${array[$r]}"
}
# generated variables
export MACHINE_COLOR=$(random_from 1 2 3 4 5 6 7 8 9 10 11 12 13 14)