Commit f24f565c authored by Roman Alifanov's avatar Roman Alifanov

multiple theme directories are now supported

parent 9b538554
......@@ -52,8 +52,21 @@ gtk3-themes-list() {
local LIST
local REPLACE_OBJ
local OUTPUT
LIST=$(basename -a /usr/share/themes/*)
local THEMES_DIRS
local THEMES_DIR
THEMES_DIRS=(
"/usr/share/themes/"
"$HOME/.themes/"
"$HOME/.local/share/themes/"
)
for THEMES_DIR in "${THEMES_DIRS[@]}"; do
if [ -z "$(find "$THEMES_DIR" -maxdepth 0 -empty)" ]; then
LIST="${LIST}$(basename -a "$THEMES_DIR"/*)\n"
fi
done
if [ "$1" == "light" ]; then
REPLACE_OBJ=$(shell_config_get "$EDITABLE_CONFIG_FILE" GTK3_LIGHT_THEME)
......@@ -72,7 +85,20 @@ kv-themes-list() {
local LIST
local REPLACE_OBJ
local OUTPUT
LIST=$(basename -a /usr/share/color-schemes/Kv* | sed 's/\.colors//')
local THEMES_DIRS
local THEMES_DIR
THEMES_DIRS=(
"/usr/share/color-schemes/"
)
for THEMES_DIR in "${THEMES_DIRS[@]}"; do
if [ -z "$(find "$THEMES_DIR" -maxdepth 0 -empty)" ]; then
LIST="${LIST}$(basename -a "$THEMES_DIR"Kv*)\n"
fi
done
LIST=$(echo "$LIST" | sed 's/\.colors//')
if [ "$1" == "light" ]; then
REPLACE_OBJ=$(shell_config_get "$EDITABLE_CONFIG_FILE" KV_LIGHT_THEME)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment