aboutsummaryrefslogtreecommitdiff
path: root/config/polybar/pwidgets/scripts/random.sh
diff options
context:
space:
mode:
authorWilliam Hergès <william@herges.fr>2025-08-12 15:19:57 +0200
committerWilliam Hergès <william@herges.fr>2025-08-12 15:19:57 +0200
commit4a21ae6fcdfcd0051a2e6fee641cd344c01dac83 (patch)
treea3741ca7f848d0f5213915d82f78fd0039a874f9 /config/polybar/pwidgets/scripts/random.sh
parentfed5ed81fbf64942dab81e7afd1eac5651290631 (diff)
Reset everything
Diffstat (limited to 'config/polybar/pwidgets/scripts/random.sh')
-rwxr-xr-xconfig/polybar/pwidgets/scripts/random.sh67
1 files changed, 0 insertions, 67 deletions
diff --git a/config/polybar/pwidgets/scripts/random.sh b/config/polybar/pwidgets/scripts/random.sh
deleted file mode 100755
index e6aa94a..0000000
--- a/config/polybar/pwidgets/scripts/random.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/env bash
-
-# Color files
-PFILE="$HOME/.config/polybar/pwidgets/colors.ini"
-RFILE="$HOME/.config/polybar/pwidgets/scripts/rofi/colors.rasi"
-
-# Change colors
-change_color() {
- # polybar
- sed -i -e "s/bg = #.*/bg = ${BG}/g" $PFILE
- sed -i -e "s/fg = #.*/fg = ${BG}/g" $PFILE
- sed -i -e "s/fga = #.*/fga = ${RFG}/g" $PFILE
- sed -i -e "s/ac = #.*/ac = ${AC}/g" $PFILE
-
- # rofi
- cat > $RFILE <<- EOF
- /* colors */
-
- * {
- al: #00000000;
- bg: ${BG}FF;
- fg: ${RFG}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
-}
-
-# Main
-BG=`get_random_color`
-RFG=`get_random_color`
-AC=`get_random_color`
-
-change_color