diff options
| author | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@gmx.com> | 2023-07-25 23:46:05 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@gmx.com> | 2023-07-25 23:46:05 +0200 |
| commit | c57e8ab185623510e527400a34d729b313daffc4 (patch) | |
| tree | 7b67d44894255ce4810d8074d68fce88f66d37d0 /config/polybar/blocks/scripts/styles.sh | |
| parent | 9f004955033387eebf3f58aec2501fba5020f307 (diff) | |
feat(polybar): update polybar style
Diffstat (limited to 'config/polybar/blocks/scripts/styles.sh')
| -rwxr-xr-x | config/polybar/blocks/scripts/styles.sh | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/config/polybar/blocks/scripts/styles.sh b/config/polybar/blocks/scripts/styles.sh new file mode 100755 index 0000000..507f069 --- /dev/null +++ b/config/polybar/blocks/scripts/styles.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash + +# Color files +PFILE="$HOME/.config/polybar/blocks/colors.ini" +RFILE="$HOME/.config/polybar/blocks/scripts/rofi/colors.rasi" + +# Change colors +change_color() { + # polybar + sed -i -e "s/background = #.*/background = $BG/g" $PFILE + sed -i -e "s/background-alt = #.*/background-alt = $BGA/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/primary = #.*/primary = $AC/g" $PFILE + + # rofi + cat > $RFILE <<- EOF + /* colors */ + + * { + al: #00000000; + bg: ${BG}FF; + bga: ${BGA}FF; + fga: ${FGA}FF; + fg: ${FG}FF; + ac: ${AC}FF; + se: ${AC}40; + } + EOF + + polybar-msg cmd restart +} + +if [[ $1 = "--default" ]]; then + BG="#2f343f" + BGA="#C4C7C5" + FGA="#C4C7C5" + FG="#1C1E20" + AC="#B4BC67" + change_color +elif [[ $1 = "--nord" ]]; then + BG="#3B4252" + BGA="#4C566A" + FGA="#E5E9F0" + FG="#ECEFF4" + AC="#A3BE8C" + change_color +elif [[ $1 = "--gruvbox" ]]; then + BG="#282828" + BGA="#EBDBB2" + FGA="#EBDBB2" + FG="#282828" + AC="#CC241D" + change_color +elif [[ $1 = "--adapta" ]]; then + BG="#243035" + BGA="#38444A" + FGA="#FDF6E3" + FG="#FFFFFF" + AC="#4DD0E1" + change_color +elif [[ $1 = "--cherry" ]]; then + BG="#1F1626" + BGA="#423949" + FGA="#FFFFFF" + FG="#FFFFFF" + AC="#D94085" + change_color +else + cat <<- _EOF_ + No option specified, Available options: + --default --nord --gruvbox --adapta --cherry + _EOF_ +fi |
