diff options
author | rafa_99 <rafa99@protonmail.com> | 2021-06-10 04:36:34 +0100 |
---|---|---|
committer | rafa_99 <rafa99@protonmail.com> | 2021-06-10 04:36:34 +0100 |
commit | a80d6dde440df455926cee4d3c0289c1a42dce62 (patch) | |
tree | d4542919860111517f13bda73d4721a1f46f41c0 /scripts/.local/bin/colorset | |
parent | 9f4909cc2a998a2f97feef2174804e4ef01c6b78 (diff) |
Updated Colorset Script, Updated artix install for arch deps, updated env vars
Diffstat (limited to 'scripts/.local/bin/colorset')
-rwxr-xr-x | scripts/.local/bin/colorset | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/scripts/.local/bin/colorset b/scripts/.local/bin/colorset new file mode 100755 index 0000000..0368897 --- /dev/null +++ b/scripts/.local/bin/colorset @@ -0,0 +1,37 @@ +#!/bin/sh + +if [ -f /usr/bin/wal ]; then + /usr/bin/wal -i "$1" +else + wal -i "$1" +fi + +# Checking for non-existant dirs +! [ -f "$SUCK"/colors/dmenu ] && mkdir -p "$SUCK"/colors/dmenu +! [ -f "$SUCK"/colors/dwm ] && mkdir -p "$SUCK"/colors/dwm +! [ -f "$SUCK"/colors/st ] && mkdir -p "$SUCK"/colors/st +! [ -f "$SUCK"/colors/tabbed ] && mkdir -p "$SUCK"/colors/tabbed + +# Purging previous colorscheme files +convert "$1" "$SUCK"/colors/wallpaper.png + +# Setting the new colorscheme based on the wallpaper and making some color tweaks +cp ~/.cache/wal/colors-wal-dmenu.h "$SUCK"/colors/dmenu/colors.h +cp ~/.cache/wal/colors-wal-st.h "$SUCK"/colors/st/colors.h +head -7 ~/.cache/wal/colors-wal-dwm.h > "$SUCK"/colors/dwm/colors.h +sed -i s/"$(grep norm_border "$SUCK"/colors/dwm/colors.h | cut -d# -f 2 | cut -d\" -f 1)"/"$(grep black "$SUCK"/colors/st/colors.h | head -1 | cut -d# -f 2 | cut -d\" -f 1)"/g "$SUCK"/colors/dwm/colors.h +cp ~/.cache/wal/colors-wal-tabbed.h "$SUCK"/colors/tabbed/colors.h + +# Recompiling Suckless Programs with new colorscheme +cp -rf "$SUCK"/colors/* "$SUCK" +cp -rf "$SUCK"/colors/wallpaper.png ~/.config/wallpaper + +xwallpaper --stretch "$WALLPAPER" +cd "$SUCK"/dwm && git pull ; doas make clean install ; make clean +cd "$SUCK"/slstatus && git pull ; doas make clean install ; make clean +cd "$SUCK"/dmenu && git pull ; doas make clean install ; make clean +cd "$SUCK"/st && git pull ; doas make clean install ; make clean +cd "$SUCK"/tabbed && git pull ; doas make clean install ; make clean +cd "$SUCK"/farbfeld && git pull ; doas make clean install ; make clean +cd "$SUCK"/sent && git pull ; doas make clean install ; make clean +cd "$SUCK"/slock && git pull ; doas make clean install ; make clean |