diff options
author | Rafael Marçalo <raroma09@gmail.com> | 2024-01-19 18:43:17 +0000 |
---|---|---|
committer | Rafael Marçalo <raroma09@gmail.com> | 2024-01-19 18:43:17 +0000 |
commit | c2e3f508e789cd3fdf80c97e40112a25325ccb05 (patch) | |
tree | ab68f49f24eeec9c4fd4a04878edcdf91e97564a /scripts | |
parent | ce4598a6bb40c4f535c9eb9916db6d789cf36461 (diff) |
Custom colorscheme support
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/.local/bin/colorpick | 3 | ||||
-rwxr-xr-x | scripts/.local/bin/colorset | 14 | ||||
-rwxr-xr-x | scripts/.local/bin/walset | 5 |
3 files changed, 15 insertions, 7 deletions
diff --git a/scripts/.local/bin/colorpick b/scripts/.local/bin/colorpick new file mode 100755 index 0000000..953f518 --- /dev/null +++ b/scripts/.local/bin/colorpick @@ -0,0 +1,3 @@ +#!/bin/sh + +xcolor -S 6 -s clipboard diff --git a/scripts/.local/bin/colorset b/scripts/.local/bin/colorset index 11057a8..5a20b40 100755 --- a/scripts/.local/bin/colorset +++ b/scripts/.local/bin/colorset @@ -1,19 +1,17 @@ #!/bin/sh -if [ -f /usr/bin/wal ]; then - /usr/bin/wal -i "$1" +if [ $# -eq 0 ]; then + wal -f "$WAL_THEME" else wal -i "$1" fi + # Checking for non-existant dirs ! [ -f "$SRC"/colors/dmenu ] && mkdir -p "$SRC"/colors/dmenu ! [ -f "$SRC"/colors/dwm ] && mkdir -p "$SRC"/colors/dwm ! [ -f "$SRC"/colors/st ] && mkdir -p "$SRC"/colors/st -# Purging previous colorscheme files -convert "$1" "$SRC"/colors/wallpaper.png - # Setting the new colorscheme based on the wallpaper and making some color tweaks cp -rf ~/.cache/wal/colors-wal-dmenu.h "$SRC"/colors/dmenu/colors.h cp -rf ~/.cache/wal/colors-wal-st.h "$SRC"/colors/st/colors.h @@ -22,7 +20,9 @@ sed -i s/"$(grep norm_border "$SRC"/colors/dwm/colors.h | cut -d# -f 2 | cut -d\ # Recompiling Suckless Programs with new colorscheme cp -rf "$SRC"/colors/* "$SRC" -cp -rf "$SRC"/colors/wallpaper.png ~/.config/wallpaper -xwallpaper --stretch "$WALLPAPER" +if [ $# -gt 0 ]; then + walset "$1" +fi + cd "$SRC" && ./compileSource diff --git a/scripts/.local/bin/walset b/scripts/.local/bin/walset new file mode 100755 index 0000000..14804ac --- /dev/null +++ b/scripts/.local/bin/walset @@ -0,0 +1,5 @@ +#!/bin/sh + +convert "$1" "$SRC"/colors/wallpaper.png +cp -rf "$SRC"/colors/wallpaper.png ~/.config/wallpaper +xwallpaper --stretch "$WALLPAPER" |