mirror of
https://github.com/eRgo35/dots.git
synced 2025-12-16 15:36:11 +01:00
22 lines
507 B
Bash
Executable File
22 lines
507 B
Bash
Executable File
#!/bin/bash
|
|
|
|
. "${HOME}/.cache/wal/colors.sh"
|
|
|
|
conffile="${HOME}/.config/mako/config"
|
|
|
|
# Associative array, color name -> color code.
|
|
declare -A colors
|
|
colors=(
|
|
["background-color"]="$background"
|
|
["text-color"]="$foreground"
|
|
["border-color"]="$color13"
|
|
)
|
|
|
|
for color_name in "${!colors[@]}"; do
|
|
# replace first occurance of each color in config file
|
|
sed -i "0,/^$color_name.*/{s//$color_name=${colors[$color_name]}/}" $conffile
|
|
done
|
|
|
|
makoctl reload
|
|
|
|
notify-send "Wallpaper and colors updated" |