aboutsummaryrefslogtreecommitdiff
path: root/config/polybar/pwidgets/scripts/styles.sh
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <anhgelus.morhtuuzh@gmx.com>2023-07-25 23:46:05 +0200
committerAnhgelus Morhtuuzh <anhgelus.morhtuuzh@gmx.com>2023-07-25 23:46:05 +0200
commitc57e8ab185623510e527400a34d729b313daffc4 (patch)
tree7b67d44894255ce4810d8074d68fce88f66d37d0 /config/polybar/pwidgets/scripts/styles.sh
parent9f004955033387eebf3f58aec2501fba5020f307 (diff)
feat(polybar): update polybar style
Diffstat (limited to 'config/polybar/pwidgets/scripts/styles.sh')
-rwxr-xr-xconfig/polybar/pwidgets/scripts/styles.sh78
1 files changed, 78 insertions, 0 deletions
diff --git a/config/polybar/pwidgets/scripts/styles.sh b/config/polybar/pwidgets/scripts/styles.sh
new file mode 100755
index 0000000..3cb0d0d
--- /dev/null
+++ b/config/polybar/pwidgets/scripts/styles.sh
@@ -0,0 +1,78 @@
+#!/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 = #FF${BG}/g" $PFILE
+ sed -i -e "s/fg = #.*/fg = #FF${FG}/g" $PFILE
+ sed -i -e "s/fga = #.*/fga = #FF${RFG}/g" $PFILE
+ sed -i -e "s/ac = #.*/ac = #FF${AC}/g" $PFILE
+
+ # rofi
+ cat > $RFILE <<- EOF
+ /* colors */
+
+ * {
+ al: #00000000;
+ bg: #${BG}FF;
+ fg: #${RFG}FF;
+ ac: #${AC}FF;
+ }
+ EOF
+
+ polybar-msg cmd restart
+}
+
+if [[ $1 = "--default" ]]; then
+ BG="212B30"
+ FG="C4C7C5"
+ RFG="C4C7C5"
+ AC="51B4FF"
+ change_color
+elif [[ $1 = "--nord" ]]; then
+ BG="3B4252"
+ FG="E5E9F0"
+ RFG="E5E9F0"
+ AC="A3BE8C"
+ change_color
+elif [[ $1 = "--gruvbox" ]]; then
+ BG="282828"
+ FG="EBDBB2"
+ RFG="EBDBB2"
+ AC="FB4934"
+ change_color
+elif [[ $1 = "--dark" ]]; then
+ BG="141C21"
+ FG="f5f5f5"
+ RFG="f5f5f5"
+ AC="FFE744"
+ change_color
+elif [[ $1 = "--cherry" ]]; then
+ BG="1F1626"
+ FG="FFFFFF"
+ RFG="FFFFFF"
+ AC="D94084"
+ change_color
+elif [[ $1 = "--white" ]]; then
+ BG="FFFFFF"
+ FG="FFFFFF"
+ RFG="454545"
+ AC="1565C0"
+ change_color
+elif [[ $1 = "--black" ]]; then
+ BG="0a0a0a"
+ FG="0a0a0a"
+ RFG="a0a0a0"
+ AC="40D8EB"
+ change_color
+else
+ cat <<- _EOF_
+ No option specified, Available options:
+ --default --nord --gruvbox --dark --cherry
+ --white --black
+ _EOF_
+fi