punkfairie
0931fb492f
Add .config/polybar/blocks/colors.ini Add .config/polybar/blocks/config.ini Add .config/polybar/blocks/launch.sh Add .config/polybar/blocks/preview.sh Add .config/polybar/blocks/modules.ini Add .config/polybar/blocks/preview.ini Add .config/polybar/blocks/scripts/checkupdates Add .config/polybar/blocks/scripts/launcher.sh Add .config/polybar/blocks/scripts/powermenu.sh Add .config/polybar/blocks/scripts/style-switch.sh Add .config/polybar/blocks/scripts/styles.sh Add .config/polybar/blocks/scripts/updates.sh Add .config/polybar/blocks/scripts/rofi/colors.rasi Add .config/polybar/blocks/scripts/rofi/confirm.rasi Add .config/polybar/blocks/scripts/rofi/launcher.rasi Add .config/polybar/blocks/scripts/rofi/message.rasi Add .config/polybar/blocks/scripts/rofi/networkmenu.rasi Add .config/polybar/blocks/scripts/rofi/powermenu.rasi Add .config/polybar/blocks/scripts/rofi/styles.rasi Add .config/polybar/blocks/user_modules.ini Add .config/polybar/colorblocks/bars.ini Add .config/polybar/colorblocks/colors.ini Add .config/polybar/colorblocks/config.ini Add .config/polybar/colorblocks/launch.sh Add .config/polybar/colorblocks/preview.sh Add .config/polybar/colorblocks/modules.ini Add .config/polybar/colorblocks/preview.ini Add .config/polybar/colorblocks/scripts/checkupdates Add .config/polybar/colorblocks/scripts/color-switch.sh Add .config/polybar/colorblocks/scripts/colors-dark.sh Add .config/polybar/colorblocks/scripts/colors-light.sh Add .config/polybar/colorblocks/scripts/launcher.sh Add .config/polybar/colorblocks/scripts/powermenu.sh Add .config/polybar/colorblocks/scripts/pywal.sh Add .config/polybar/colorblocks/scripts/random.sh Add .config/polybar/colorblocks/scripts/updates.sh Add .config/polybar/colorblocks/scripts/rofi/colors.rasi Add .config/polybar/colorblocks/scripts/rofi/confirm.rasi Add .config/polybar/colorblocks/scripts/rofi/launcher.rasi Add .config/polybar/colorblocks/scripts/rofi/message.rasi Add .config/polybar/colorblocks/scripts/rofi/networkmenu.rasi Add .config/polybar/colorblocks/scripts/rofi/powermenu.rasi Add .config/polybar/colorblocks/scripts/rofi/styles.rasi Add .config/polybar/colorblocks/user_modules.ini Add .config/polybar/cuts/bars.ini Add .config/polybar/cuts/colors.ini Add .config/polybar/cuts/config.ini Add .config/polybar/cuts/launch.sh Add .config/polybar/cuts/preview.sh Add .config/polybar/cuts/modules.ini Add .config/polybar/cuts/preview.ini Add .config/polybar/cuts/scripts/checkupdates Add .config/polybar/cuts/scripts/color-switch.sh Add .config/polybar/cuts/scripts/colors-dark.sh Add .config/polybar/cuts/scripts/colors-light.sh Add .config/polybar/cuts/scripts/launcher.sh Add .config/polybar/cuts/scripts/powermenu.sh Add .config/polybar/cuts/scripts/pywal.sh Add .config/polybar/cuts/scripts/random.sh Add .config/polybar/cuts/scripts/style-switch.sh Add .config/polybar/cuts/scripts/styles.sh Add .config/polybar/cuts/scripts/updates.sh Add .config/polybar/cuts/scripts/rofi/colors.rasi Add .config/polybar/cuts/scripts/rofi/confirm.rasi Add .config/polybar/cuts/scripts/rofi/launcher.rasi Add .config/polybar/cuts/scripts/rofi/message.rasi Add .config/polybar/cuts/scripts/rofi/networkmenu.rasi Add .config/polybar/cuts/scripts/rofi/powermenu.rasi Add .config/polybar/cuts/scripts/rofi/styles.rasi Add .config/polybar/cuts/user_modules.ini Add .config/polybar/docky/bars.ini Add .config/polybar/docky/colors.ini Add .config/polybar/docky/config.ini Add .config/polybar/docky/launch.sh Add .config/polybar/docky/preview.sh Add .config/polybar/docky/modules.ini Add .config/polybar/docky/preview.ini Add .config/polybar/docky/scripts/checkupdates Add .config/polybar/docky/scripts/color-switch.sh Add .config/polybar/docky/scripts/colors-dark.sh Add .config/polybar/docky/scripts/colors-light.sh Add .config/polybar/docky/scripts/launcher.sh Add .config/polybar/docky/scripts/powermenu.sh Add .config/polybar/docky/scripts/pywal.sh Add .config/polybar/docky/scripts/random.sh Add .config/polybar/docky/scripts/updates.sh Add .config/polybar/docky/scripts/rofi/colors.rasi Add .config/polybar/docky/scripts/rofi/confirm.rasi Add .config/polybar/docky/scripts/rofi/launcher.rasi Add .config/polybar/docky/scripts/rofi/message.rasi Add .config/polybar/docky/scripts/rofi/networkmenu.rasi Add .config/polybar/docky/scripts/rofi/powermenu.rasi Add .config/polybar/docky/scripts/rofi/styles.rasi Add .config/polybar/docky/user_modules.ini Add .config/polybar/launch.sh Add .config/polybar/forest/bars.ini Add .config/polybar/forest/colors.ini Add .config/polybar/forest/config.ini Add .config/polybar/forest/launch.sh Add .config/polybar/forest/preview.sh Add .config/polybar/forest/modules.ini Add .config/polybar/forest/preview.ini Add .config/polybar/forest/scripts/checkupdates Add .config/polybar/forest/scripts/launcher.sh Add .config/polybar/forest/scripts/powermenu.sh Add .config/polybar/forest/scripts/style-switch.sh Add .config/polybar/forest/scripts/styles.sh Add .config/polybar/forest/scripts/updates.sh Add .config/polybar/forest/scripts/rofi/colors.rasi Add .config/polybar/forest/scripts/rofi/confirm.rasi Add .config/polybar/forest/scripts/rofi/launcher.rasi Add .config/polybar/forest/scripts/rofi/message.rasi Add .config/polybar/forest/scripts/rofi/networkmenu.rasi Add .config/polybar/forest/scripts/rofi/powermenu.rasi Add .config/polybar/forest/scripts/rofi/styles.rasi Add .config/polybar/forest/user_modules.ini Add .config/polybar/grayblocks/bars.ini Add .config/polybar/grayblocks/colors.ini Add .config/polybar/grayblocks/config.ini Add .config/polybar/grayblocks/launch.sh Add .config/polybar/grayblocks/preview.sh Add .config/polybar/grayblocks/modules.ini Add .config/polybar/grayblocks/preview.ini Add .config/polybar/grayblocks/scripts/checkupdates Add .config/polybar/grayblocks/scripts/color-switch.sh Add .config/polybar/grayblocks/scripts/colors-dark.sh Add .config/polybar/grayblocks/scripts/colors-light.sh Add .config/polybar/grayblocks/scripts/launcher.sh Add .config/polybar/grayblocks/scripts/powermenu.sh Add .config/polybar/grayblocks/scripts/pywal.sh Add .config/polybar/grayblocks/scripts/random.sh Add .config/polybar/grayblocks/scripts/updates.sh Add .config/polybar/grayblocks/scripts/rofi/colors.rasi Add .config/polybar/grayblocks/scripts/rofi/confirm.rasi Add .config/polybar/grayblocks/scripts/rofi/launcher.rasi Add .config/polybar/grayblocks/scripts/rofi/message.rasi Add .config/polybar/grayblocks/scripts/rofi/networkmenu.rasi Add .config/polybar/grayblocks/scripts/rofi/powermenu.rasi Add .config/polybar/grayblocks/scripts/rofi/styles.rasi Add .config/polybar/grayblocks/user_modules.ini Add .config/polybar/hack/bars.ini Add .config/polybar/hack/colors.ini Add .config/polybar/hack/config.ini Add .config/polybar/hack/launch.sh Add .config/polybar/hack/preview.sh Add .config/polybar/hack/modules.ini Add .config/polybar/hack/preview.ini Add .config/polybar/hack/scripts/check-network Add .config/polybar/hack/scripts/checkupdates Add .config/polybar/hack/scripts/color-switch.sh Add .config/polybar/hack/scripts/colors-dark.sh Add .config/polybar/hack/scripts/colors-light.sh Add .config/polybar/hack/scripts/launcher.sh Add .config/polybar/hack/scripts/powermenu.sh Add .config/polybar/hack/scripts/pywal.sh Add .config/polybar/hack/scripts/random.sh Add .config/polybar/hack/scripts/updates.sh Add .config/polybar/hack/scripts/rofi/colors.rasi Add .config/polybar/hack/scripts/rofi/confirm.rasi Add .config/polybar/hack/scripts/rofi/launcher.rasi Add .config/polybar/hack/scripts/rofi/message.rasi Add .config/polybar/hack/scripts/rofi/networkmenu.rasi Add .config/polybar/hack/scripts/rofi/powermenu.rasi Add .config/polybar/hack/scripts/rofi/styles.rasi Add .config/polybar/hack/user_modules.ini Add .config/polybar/material/bars.ini Add .config/polybar/material/colors.ini Add .config/polybar/material/config.ini Add .config/polybar/material/launch.sh Add .config/polybar/material/preview.sh Add .config/polybar/material/modules.ini Add .config/polybar/material/preview.ini Add .config/polybar/material/scripts/checkupdates Add .config/polybar/material/scripts/color-switch.sh Add .config/polybar/material/scripts/colors-dark.sh Add .config/polybar/material/scripts/colors-light.sh Add .config/polybar/material/scripts/launcher.sh Add .config/polybar/material/scripts/powermenu.sh Add .config/polybar/material/scripts/pywal.sh Add .config/polybar/material/scripts/random.sh Add .config/polybar/material/scripts/updates.sh Add .config/polybar/material/scripts/rofi/colors.rasi Add .config/polybar/material/scripts/rofi/confirm.rasi Add .config/polybar/material/scripts/rofi/launcher.rasi Add .config/polybar/material/scripts/rofi/message.rasi Add .config/polybar/material/scripts/rofi/networkmenu.rasi Add .config/polybar/material/scripts/rofi/powermenu.rasi Add .config/polybar/material/scripts/rofi/styles.rasi Add .config/polybar/material/user_modules.ini Add .config/polybar/panels/config.ini Add .config/polybar/panels/launch.sh Add .config/polybar/panels/menu/budgie/colors.rasi Add .config/polybar/panels/menu/budgie/confirm.rasi Add .config/polybar/panels/menu/budgie/launcher.rasi Add .config/polybar/panels/menu/budgie/message.rasi Add .config/polybar/panels/menu/budgie/networkmenu.rasi Add .config/polybar/panels/menu/budgie/powermenu.rasi Add .config/polybar/panels/menu/budgie/styles.rasi Add .config/polybar/panels/menu/deepin/colors.rasi Add .config/polybar/panels/menu/deepin/confirm.rasi Add .config/polybar/panels/menu/deepin/launcher.rasi Add .config/polybar/panels/menu/deepin/message.rasi Add .config/polybar/panels/menu/deepin/networkmenu.rasi Add .config/polybar/panels/menu/deepin/powermenu.rasi Add .config/polybar/panels/menu/deepin/styles.rasi Add .config/polybar/panels/menu/elementary/colors.rasi Add .config/polybar/panels/menu/elementary/confirm.rasi Add .config/polybar/panels/menu/elementary/launcher.rasi Add .config/polybar/panels/menu/elementary/message.rasi Add .config/polybar/panels/menu/elementary/networkmenu.rasi Add .config/polybar/panels/menu/elementary/powermenu.rasi Add .config/polybar/panels/menu/elementary/styles.rasi Add .config/polybar/panels/menu/elementary_dark/colors.rasi Add .config/polybar/panels/menu/elementary_dark/confirm.rasi Add .config/polybar/panels/menu/elementary_dark/launcher.rasi Add .config/polybar/panels/menu/elementary_dark/message.rasi Add .config/polybar/panels/menu/elementary_dark/networkmenu.rasi Add .config/polybar/panels/menu/elementary_dark/powermenu.rasi Add .config/polybar/panels/menu/elementary_dark/styles.rasi Add .config/polybar/panels/menu/gnome/colors.rasi Add .config/polybar/panels/menu/gnome/confirm.rasi Add .config/polybar/panels/menu/gnome/launcher.rasi Add .config/polybar/panels/menu/gnome/message.rasi Add .config/polybar/panels/menu/gnome/networkmenu.rasi Add .config/polybar/panels/menu/gnome/powermenu.rasi Add .config/polybar/panels/menu/gnome/styles.rasi Add .config/polybar/panels/menu/kde/colors.rasi Add .config/polybar/panels/menu/kde/confirm.rasi Add .config/polybar/panels/menu/kde/launcher.rasi Add .config/polybar/panels/menu/kde/message.rasi Add .config/polybar/panels/menu/kde/networkmenu.rasi Add .config/polybar/panels/menu/kde/powermenu.rasi Add .config/polybar/panels/menu/kde/styles.rasi Add .config/polybar/panels/menu/kde_dark/colors.rasi Add .config/polybar/panels/menu/kde_dark/confirm.rasi Add .config/polybar/panels/menu/kde_dark/launcher.rasi Add .config/polybar/panels/menu/kde_dark/message.rasi Add .config/polybar/panels/menu/kde_dark/networkmenu.rasi Add .config/polybar/panels/menu/kde_dark/powermenu.rasi Add .config/polybar/panels/menu/kde_dark/styles.rasi Add .config/polybar/panels/menu/liri/colors.rasi Add .config/polybar/panels/menu/liri/confirm.rasi Add .config/polybar/panels/menu/liri/launcher.rasi Add .config/polybar/panels/menu/liri/message.rasi Add .config/polybar/panels/menu/liri/networkmenu.rasi Add .config/polybar/panels/menu/liri/powermenu.rasi Add .config/polybar/panels/menu/liri/styles.rasi Add .config/polybar/panels/menu/mint/colors.rasi Add .config/polybar/panels/menu/mint/confirm.rasi Add .config/polybar/panels/menu/mint/launcher.rasi Add .config/polybar/panels/menu/mint/message.rasi Add .config/polybar/panels/menu/mint/networkmenu.rasi Add .config/polybar/panels/menu/mint/powermenu.rasi Add .config/polybar/panels/menu/mint/styles.rasi Add .config/polybar/panels/menu/ubuntu_gnome/colors.rasi Add .config/polybar/panels/menu/ubuntu_gnome/confirm.rasi Add .config/polybar/panels/menu/ubuntu_gnome/launcher.rasi Add .config/polybar/panels/menu/ubuntu_gnome/message.rasi Add .config/polybar/panels/menu/ubuntu_gnome/networkmenu.rasi Add .config/polybar/panels/menu/ubuntu_gnome/powermenu.rasi Add .config/polybar/panels/menu/ubuntu_gnome/styles.rasi Add .config/polybar/panels/menu/ubuntu_unity/colors.rasi Add .config/polybar/panels/menu/ubuntu_unity/confirm.rasi Add .config/polybar/panels/menu/ubuntu_unity/launcher.rasi Add .config/polybar/panels/menu/ubuntu_unity/message.rasi Add .config/polybar/panels/menu/ubuntu_unity/networkmenu.rasi Add .config/polybar/panels/menu/ubuntu_unity/powermenu.rasi Add .config/polybar/panels/menu/ubuntu_unity/styles.rasi Add .config/polybar/panels/menu/xubuntu/colors.rasi Add .config/polybar/panels/menu/xubuntu/confirm.rasi Add .config/polybar/panels/menu/xubuntu/launcher.rasi Add .config/polybar/panels/menu/xubuntu/message.rasi Add .config/polybar/panels/menu/xubuntu/networkmenu.rasi Add .config/polybar/panels/menu/xubuntu/powermenu.rasi Add .config/polybar/panels/menu/xubuntu/styles.rasi Add .config/polybar/panels/menu/zorin/colors.rasi Add .config/polybar/panels/menu/zorin/confirm.rasi Add .config/polybar/panels/menu/zorin/launcher.rasi Add .config/polybar/panels/menu/zorin/message.rasi Add .config/polybar/panels/menu/zorin/networkmenu.rasi Add .config/polybar/panels/menu/zorin/powermenu.rasi Add .config/polybar/panels/menu/zorin/styles.rasi Add .config/polybar/panels/panel/budgie.ini Add .config/polybar/panels/panel/deepin.ini Add .config/polybar/panels/panel/elementary.ini Add .config/polybar/panels/panel/elementary_dark.ini Add .config/polybar/panels/panel/gnome.ini Add .config/polybar/panels/panel/kde.ini Add .config/polybar/panels/panel/kde_dark.ini Add .config/polybar/panels/panel/liri.ini Add .config/polybar/panels/panel/mint.ini Add .config/polybar/panels/panel/ubuntu_gnome.ini Add .config/polybar/panels/panel/ubuntu_unity.ini Add .config/polybar/panels/panel/xubuntu.ini Add .config/polybar/panels/panel/zorin.ini Add .config/polybar/panels/scripts/launcher.sh Add .config/polybar/panels/scripts/powermenu.sh Add .config/polybar/panels/scripts/style-switch.sh Add .config/polybar/panels/scripts/styles.sh Add .config/polybar/panels/wallpapers/budgie.jpg Add .config/polybar/panels/wallpapers/deepin.jpg Add .config/polybar/panels/wallpapers/elementary.jpg Add .config/polybar/panels/wallpapers/elementary_2.jpg Add .config/polybar/panels/wallpapers/gnome.jpg Add .config/polybar/panels/wallpapers/kde.jpg Add .config/polybar/panels/wallpapers/kde_2.jpg Add .config/polybar/panels/wallpapers/liri.png Add .config/polybar/panels/wallpapers/mint.jpg Add .config/polybar/panels/wallpapers/ubuntu.jpg Add .config/polybar/panels/wallpapers/xubuntu.png Add .config/polybar/panels/wallpapers/zorin.png Add .config/polybar/pwidgets/apps.ini Add .config/polybar/pwidgets/colors.ini Add .config/polybar/pwidgets/cpu.ini Add .config/polybar/pwidgets/launch.sh Add .config/polybar/pwidgets/fs.ini Add .config/polybar/pwidgets/main.ini Add .config/polybar/pwidgets/memory.ini Add .config/polybar/pwidgets/mpd.ini Add .config/polybar/pwidgets/scripts/launcher.sh Add .config/polybar/pwidgets/scripts/powermenu.sh Add .config/polybar/pwidgets/scripts/pywal.sh Add .config/polybar/pwidgets/scripts/random.sh Add .config/polybar/pwidgets/scripts/style-switch.sh Add .config/polybar/pwidgets/scripts/styles.sh Add .config/polybar/pwidgets/scripts/rofi/colors.rasi Add .config/polybar/pwidgets/scripts/rofi/confirm.rasi Add .config/polybar/pwidgets/scripts/rofi/launcher.rasi Add .config/polybar/pwidgets/scripts/rofi/message.rasi Add .config/polybar/pwidgets/scripts/rofi/networkmenu.rasi Add .config/polybar/pwidgets/scripts/rofi/powermenu.rasi Add .config/polybar/pwidgets/scripts/rofi/styles.rasi Add .config/polybar/pwidgets/system.ini Add .config/polybar/pwidgets/workspace.ini Add .config/polybar/shades/bars.ini Add .config/polybar/shades/colors.ini Add .config/polybar/shades/config.ini Add .config/polybar/shades/launch.sh Add .config/polybar/shades/preview.sh Add .config/polybar/shades/modules.ini Add .config/polybar/shades/preview.ini Add .config/polybar/shades/scripts/checkupdates Add .config/polybar/shades/scripts/color-switch.sh Add .config/polybar/shades/scripts/colors-dark.sh Add .config/polybar/shades/scripts/colors-light.sh Add .config/polybar/shades/scripts/launcher.sh Add .config/polybar/shades/scripts/powermenu.sh Add .config/polybar/shades/scripts/pywal.sh Add .config/polybar/shades/scripts/random.sh Add .config/polybar/shades/scripts/updates.sh Add .config/polybar/shades/scripts/rofi/colors.rasi Add .config/polybar/shades/scripts/rofi/confirm.rasi Add .config/polybar/shades/scripts/rofi/launcher.rasi Add .config/polybar/shades/scripts/rofi/message.rasi Add .config/polybar/shades/scripts/rofi/networkmenu.rasi Add .config/polybar/shades/scripts/rofi/powermenu.rasi Add .config/polybar/shades/scripts/rofi/styles.rasi Add .config/polybar/shades/user_modules.ini Add .config/polybar/shapes/bars.ini Add .config/polybar/shapes/colors.ini Add .config/polybar/shapes/config.ini Add .config/polybar/shapes/launch.sh Add .config/polybar/shapes/preview.sh Add .config/polybar/shapes/glyphs.ini Add .config/polybar/shapes/modules.ini Add .config/polybar/shapes/preview.ini Add .config/polybar/shapes/scripts/checkupdates Add .config/polybar/shapes/scripts/color-switch.sh Add .config/polybar/shapes/scripts/colors-dark.sh Add .config/polybar/shapes/scripts/colors-light.sh Add .config/polybar/shapes/scripts/launcher.sh Add .config/polybar/shapes/scripts/powermenu.sh Add .config/polybar/shapes/scripts/pywal.sh Add .config/polybar/shapes/scripts/random.sh Add .config/polybar/shapes/scripts/style-switch.sh Add .config/polybar/shapes/scripts/updates.sh Add .config/polybar/shapes/scripts/rofi/colors.rasi Add .config/polybar/shapes/scripts/rofi/confirm.rasi Add .config/polybar/shapes/scripts/rofi/launcher.rasi Add .config/polybar/shapes/scripts/rofi/message.rasi Add .config/polybar/shapes/scripts/rofi/networkmenu.rasi Add .config/polybar/shapes/scripts/rofi/powermenu.rasi Add .config/polybar/shapes/scripts/rofi/styles.rasi Add .config/polybar/shapes/user_modules.ini
96 lines
1.9 KiB
Bash
96 lines
1.9 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Color files
|
|
PFILE="$HOME/.config/polybar/docky/colors.ini"
|
|
RFILE="$HOME/.config/polybar/docky/scripts/rofi/colors.rasi"
|
|
|
|
# Change colors
|
|
change_color() {
|
|
# polybar
|
|
sed -i -e "s/background = #.*/background = $BG/g" $PFILE
|
|
sed -i -e "s/foreground = #.*/foreground = $FG/g" $PFILE
|
|
sed -i -e "s/foreground-alt = #.*/foreground-alt = $FGA/g" $PFILE
|
|
sed -i -e "s/module-fg = #.*/module-fg = $MF/g" $PFILE
|
|
sed -i -e "s/primary = #.*/primary = $AC/g" $PFILE
|
|
sed -i -e "s/secondary = #.*/secondary = $SC/g" $PFILE
|
|
sed -i -e "s/alternate = #.*/alternate = $AL/g" $PFILE
|
|
|
|
# rofi
|
|
cat > $RFILE <<- EOF
|
|
/* colors */
|
|
|
|
* {
|
|
al: #00000000;
|
|
bg: ${BG}FF;
|
|
bga: ${AC}33;
|
|
bar: ${MF}FF;
|
|
fg: ${FG}FF;
|
|
ac: ${AC}FF;
|
|
}
|
|
EOF
|
|
|
|
polybar-msg cmd restart
|
|
}
|
|
|
|
get_random_number() {
|
|
RNUM=$(( ($RANDOM % $1) + 1 ))
|
|
}
|
|
|
|
get_random_color() {
|
|
RCOLOR="#"
|
|
for i in 1 2 3 4 5 6
|
|
do
|
|
get_random_number "16"
|
|
case $RNUM in
|
|
"1") NEXTDIGIT="1";;
|
|
"2") NEXTDIGIT="2";;
|
|
"3") NEXTDIGIT="3";;
|
|
"4") NEXTDIGIT="4";;
|
|
"5") NEXTDIGIT="5";;
|
|
"6") NEXTDIGIT="6";;
|
|
"7") NEXTDIGIT="7";;
|
|
"8") NEXTDIGIT="8";;
|
|
"9") NEXTDIGIT="9";;
|
|
"10") NEXTDIGIT="A";;
|
|
"11") NEXTDIGIT="B";;
|
|
"12") NEXTDIGIT="C";;
|
|
"13") NEXTDIGIT="D";;
|
|
"14") NEXTDIGIT="E";;
|
|
"15") NEXTDIGIT="F";;
|
|
"16") NEXTDIGIT="0";;
|
|
esac
|
|
RCOLOR="$RCOLOR$NEXTDIGIT"
|
|
done
|
|
echo $RCOLOR
|
|
}
|
|
|
|
hex_to_rgb() {
|
|
# Convert a hex value WITHOUT the hashtag (#)
|
|
R=$(printf "%d" 0x${1:0:2})
|
|
G=$(printf "%d" 0x${1:2:2})
|
|
B=$(printf "%d" 0x${1:4:2})
|
|
}
|
|
|
|
get_fg_color(){
|
|
INTENSITY=$(calc "$R*0.299 + $G*0.587 + $B*0.114")
|
|
|
|
if [ $(echo "$INTENSITY>186" | bc) -eq 1 ]; then
|
|
MF="#0a0a0a"
|
|
else
|
|
MF="#F5F5F5"
|
|
fi
|
|
}
|
|
|
|
# Main
|
|
BG='#1F1F1F' # change to light bg
|
|
FG='#FFFFFF' # change to dark fg
|
|
FGA=`get_random_color`
|
|
AC=`get_random_color`
|
|
SC=`get_random_color`
|
|
AL=`get_random_color`
|
|
|
|
HEX=${AC:1}
|
|
|
|
hex_to_rgb $HEX
|
|
get_fg_color
|
|
change_color
|