From 82df70eff06e7b44ee84283070d7f801f7fc1d92 Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sat, 6 Nov 2021 20:25:45 -0400 Subject: initial commit --- .local/bin/theme/get-gradient | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 .local/bin/theme/get-gradient (limited to '.local/bin/theme/get-gradient') diff --git a/.local/bin/theme/get-gradient b/.local/bin/theme/get-gradient new file mode 100755 index 0000000..91f9391 --- /dev/null +++ b/.local/bin/theme/get-gradient @@ -0,0 +1,13 @@ +#!/bin/sh +# Gets and sets a color gradient for cava + +start="$1" +end="$2" +colors=$(~/.local/bin/theme/gradient.py $start $end 7) + +num=1 +path="$HOME/.config/cava/config" +for color in $colors; do + sed -i "s/gradient_color_$num.*$/gradient_color_$num = '$color'/" $path + num=$((num+1)) +done -- cgit v1.2.3