summaryrefslogtreecommitdiff
path: root/scripts/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/.local/bin')
-rwxr-xr-xscripts/.local/bin/colorpick3
-rwxr-xr-xscripts/.local/bin/colorset14
-rwxr-xr-xscripts/.local/bin/walset5
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"