From 9e82c96713989a7565eadac505b36e3dbe91cd5a Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sun, 11 Jun 2023 07:56:17 -0400 Subject: Added, removed, renamed scripts --- .local/bin/theme/get-gradient | 13 ------------- .local/bin/theme/gradient.py | 24 ------------------------ 2 files changed, 37 deletions(-) delete mode 100755 .local/bin/theme/get-gradient delete mode 100755 .local/bin/theme/gradient.py (limited to '.local/bin/theme') diff --git a/.local/bin/theme/get-gradient b/.local/bin/theme/get-gradient deleted file mode 100755 index 91f9391..0000000 --- a/.local/bin/theme/get-gradient +++ /dev/null @@ -1,13 +0,0 @@ -#!/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 diff --git a/.local/bin/theme/gradient.py b/.local/bin/theme/gradient.py deleted file mode 100755 index f95bb07..0000000 --- a/.local/bin/theme/gradient.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/python3 -# Gets a color gradient based on input color and number -# Depends on python3-colour - -import colour,sys - -if len(sys.argv) != 4: - print("arg error") - sys.exit(1) - -start = sys.argv[1] -end = sys.argv[2] -num = int(sys.argv[3]) - -grad = colour.color_scale(colour.hex2hsl(start),colour.hex2hsl(end),num) -grad_hex = [] -for hsl in grad: - grad_hex.append(colour.hsl2hex(hsl)) - -for color in grad_hex: - sys.stdout.write(color + "\n") - - - -- cgit v1.2.3