Created
July 27, 2020 08:39
-
-
Save yuvalif/494233fa345765a71389f5e26f784f21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
profiles=$(dconf dump /org/gnome/terminal/legacy/profiles:/ | grep 'visible-name' | tr "'" '"' | awk 'BEGIN{FS="="; ORS=","}{print $2}') | |
IFS=',' | |
i=0 | |
for p in $profiles | |
do | |
out[$i]=$p | |
((i=i+1)) | |
done | |
p_idx=$(od -A n -t d -N 1 /dev/urandom) | |
p_idx=$((p_idx % "$i")) | |
profile=${out[$p_idx]} | |
cmd="gnome-terminal --maximize --full-screen --profile=$profile" | |
eval $cmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment