script: refactor change-colortheme
This commit is contained in:
22
fuzzel/apply-color
Executable file
22
fuzzel/apply-color
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
path=$(dirname "$(readlink -f "$0")")
|
||||
. "$path"/../.utils/apply-color-parse-arg
|
||||
|
||||
file="$path"/fuzzel.ini
|
||||
entries="match selection-match border"
|
||||
|
||||
if pgrep -x "fuzzel" -u "$USER" > /dev/null; then
|
||||
pkill -x fuzzel || log_error "Failed to kill fuzzel process"
|
||||
# and move on
|
||||
fi
|
||||
|
||||
for entry in $entries; do
|
||||
# Not very sure if alpha channels are neccessary here, but just in case
|
||||
sed -i -E "s/^($entry\s*=\s*)([0-9A-Fa-f]{6})([0-9A-Fa-f]{0,2})/\1${colorHex}\3/" "$file" || {
|
||||
log_error "Failed to edit ${file} for entry ${entry}"
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
|
||||
log_success "fuzzel"
|
||||
@@ -1,24 +0,0 @@
|
||||
terminal=kitty -e
|
||||
prompt=">> "
|
||||
layer=overlay
|
||||
|
||||
[colors]
|
||||
background=1e1e2edd
|
||||
text=cdd6f4ff
|
||||
prompt=bac2deff
|
||||
placeholder=7f849cff
|
||||
input=cdd6f4ff
|
||||
match=<FLAVOR_HEX>ff
|
||||
selection=585b70ff
|
||||
selection-text=cdd6f4ff
|
||||
selection-match=<FLAVOR_HEX>ff
|
||||
counter=7f849cff
|
||||
border=<FLAVOR_HEX>ff
|
||||
|
||||
|
||||
[border]
|
||||
radius=17
|
||||
width=2
|
||||
|
||||
[dmenu]
|
||||
exit-immediately-if-empty=yes
|
||||
Reference in New Issue
Block a user