diff --git a/bin/colorizer b/bin/colorizer index 8492f97..f295819 100755 --- a/bin/colorizer +++ b/bin/colorizer @@ -334,11 +334,140 @@ out+=("^sep()") out+=("$ACCENT_COLORS,^checkout(acccolors)") out2+=("^tag(acccolors)") out2+=("^sep(Ubuntu)") -for i in ${ubuntu[@]};do out2+=("$i ,w2theme accent '${i}';colorizer -s");done +for i in ${ubuntu[@]};do +if [ $rootcolors = select ];then +((n+=1)) +out2+=("$i ,^checkout(${i:1}${n}") +out3+=("^tag(${i:1}${n})") +out3+=("^sep($COLOR $i )") +out3+=("$SETACCENT,w2theme accent '${i}';colorizer -s") +out3+=("^sep(OpenBox)") +out3+=("^sep($ACTIVE_WIN)") +out3+=("$OB_ACTIVE_BG,obtctl clractivebg '${i}';colorizer -s") +out3+=("$OB_ACTIVE_BGTO,obtctl clractivebgto '${i}';colorizer -s") +out3+=("$OB_ACTIVE_TEXT,obtctl activetextcolor '${i}';colorizer -s") +out3+=("$OB_ACTIVE_BORDER,obtctl activeborderColor '${i}';colorizer -s") +out3+=("^sep($INACTIVE_WIN)") +out3+=("$OB_INACTIVE_BG,obtctl clrnormalbg '${i}';colorizer -s") +out3+=("$OB_INACTIVE_BGTO,obtctl clrnormalbgto '${i}';colorizer -s") +out3+=("$OB_INACTIVE_TEXT,obtctl inactivetextcolor '${i}';colorizer -s") +out3+=("$OB_INACTIVE_BORDER,obtctl inactiveborderColor '${i}';colorizer -s") + +out3+=("^sep($MENUPANELS)") +out3+=("$MENU_BGCOLOR,jgctl color_menu_bg '${i}';colorizer -s") +out3+=("$MENU_SEP_BG,jgctl color_title_bg '${i}';colorizer -s") +out3+=("$MENU_ITEM_FG,jgctl color_norm_fg '${i}';colorizer -s") +out3+=("$MENU_ACTIVE_BG,jgctl color_sel_bg '${i}';colorizer -s") +out3+=("$MENU_BORDER,jgctl color_menu_border '${i}';colorizer -s") + +out3+=("^sep(Conky)") +out3+=("$CONKY_BGCOLOR_ALL,conkyctl win_bgcolor_all '${i}';colorizer -s") + # array with running conkies - only filenames with full path + readarray -t running < <(pgrep -af "conky.*mbcolor" | cut -d' ' -f4) + +if [[ ${#running[@]} > 0 ]];then + out3+=("^sep($RUNNING_CONKYS)") + for c in ${running[@]};do + filename=${c##*/} + name=${filename%%_mb*} + title=${name//_/ } + out3+=("$BGCOLOR_OF ${title^},conkyctl win_bgcolor '${i}' '${c}';colorizer -s") + done +fi +else +out2+=("$i ,w2theme accent '${i}';colorizer -s") +fi +done out2+=("^sep(Mint)") -for i in ${mint[@]};do out2+=("$i ,w2theme accent '${i}';colorizer -s");done +for i in ${mint[@]};do +if [ $rootcolors = select ];then +((n+=1)) +out2+=("$i ,^checkout(${i:1}${n}") +out3+=("^tag(${i:1}${n})") +out3+=("^sep($COLOR $i )") +out3+=("$SETACCENT,w2theme accent '${i}';colorizer -s") +out3+=("^sep(OpenBox)") +out3+=("^sep($ACTIVE_WIN)") +out3+=("$OB_ACTIVE_BG,obtctl clractivebg '${i}';colorizer -s") +out3+=("$OB_ACTIVE_BGTO,obtctl clractivebgto '${i}';colorizer -s") +out3+=("$OB_ACTIVE_TEXT,obtctl activetextcolor '${i}';colorizer -s") +out3+=("$OB_ACTIVE_BORDER,obtctl activeborderColor '${i}';colorizer -s") +out3+=("^sep($INACTIVE_WIN)") +out3+=("$OB_INACTIVE_BG,obtctl clrnormalbg '${i}';colorizer -s") +out3+=("$OB_INACTIVE_BGTO,obtctl clrnormalbgto '${i}';colorizer -s") +out3+=("$OB_INACTIVE_TEXT,obtctl inactivetextcolor '${i}';colorizer -s") +out3+=("$OB_INACTIVE_BORDER,obtctl inactiveborderColor '${i}';colorizer -s") + +out3+=("^sep($MENUPANELS)") +out3+=("$MENU_BGCOLOR,jgctl color_menu_bg '${i}';colorizer -s") +out3+=("$MENU_SEP_BG,jgctl color_title_bg '${i}';colorizer -s") +out3+=("$MENU_ITEM_FG,jgctl color_norm_fg '${i}';colorizer -s") +out3+=("$MENU_ACTIVE_BG,jgctl color_sel_bg '${i}';colorizer -s") +out3+=("$MENU_BORDER,jgctl color_menu_border '${i}';colorizer -s") + +out3+=("^sep(Conky)") +out3+=("$CONKY_BGCOLOR_ALL,conkyctl win_bgcolor_all '${i}';colorizer -s") + # array with running conkies - only filenames with full path + readarray -t running < <(pgrep -af "conky.*mbcolor" | cut -d' ' -f4) + +if [[ ${#running[@]} > 0 ]];then + out3+=("^sep($RUNNING_CONKYS)") + for c in ${running[@]};do + filename=${c##*/} + name=${filename%%_mb*} + title=${name//_/ } + out3+=("$BGCOLOR_OF ${title^},conkyctl win_bgcolor '${i}' '${c}';colorizer -s") + done +fi +else +out2+=("$i ,w2theme accent '${i}';colorizer -s") +fi +done out2+=("^sep(Plasma)") -for i in ${plasma[@]};do out2+=("$i ,w2theme accent '${i}';colorizer -s");done +for i in ${plasma[@]};do +if [ $rootcolors = select ];then +((n+=1)) +out2+=("$i ,^checkout(${i:1}${n}") +out3+=("^tag(${i:1}${n})") +out3+=("^sep($COLOR $i )") +out3+=("$SETACCENT,w2theme accent '${i}';colorizer -s") +out3+=("^sep(OpenBox)") +out3+=("^sep($ACTIVE_WIN)") +out3+=("$OB_ACTIVE_BG,obtctl clractivebg '${i}';colorizer -s") +out3+=("$OB_ACTIVE_BGTO,obtctl clractivebgto '${i}';colorizer -s") +out3+=("$OB_ACTIVE_TEXT,obtctl activetextcolor '${i}';colorizer -s") +out3+=("$OB_ACTIVE_BORDER,obtctl activeborderColor '${i}';colorizer -s") +out3+=("^sep($INACTIVE_WIN)") +out3+=("$OB_INACTIVE_BG,obtctl clrnormalbg '${i}';colorizer -s") +out3+=("$OB_INACTIVE_BGTO,obtctl clrnormalbgto '${i}';colorizer -s") +out3+=("$OB_INACTIVE_TEXT,obtctl inactivetextcolor '${i}';colorizer -s") +out3+=("$OB_INACTIVE_BORDER,obtctl inactiveborderColor '${i}';colorizer -s") + +out3+=("^sep($MENUPANELS)") +out3+=("$MENU_BGCOLOR,jgctl color_menu_bg '${i}';colorizer -s") +out3+=("$MENU_SEP_BG,jgctl color_title_bg '${i}';colorizer -s") +out3+=("$MENU_ITEM_FG,jgctl color_norm_fg '${i}';colorizer -s") +out3+=("$MENU_ACTIVE_BG,jgctl color_sel_bg '${i}';colorizer -s") +out3+=("$MENU_BORDER,jgctl color_menu_border '${i}';colorizer -s") + +out3+=("^sep(Conky)") +out3+=("$CONKY_BGCOLOR_ALL,conkyctl win_bgcolor_all '${i}';colorizer -s") + # array with running conkies - only filenames with full path + readarray -t running < <(pgrep -af "conky.*mbcolor" | cut -d' ' -f4) + +if [[ ${#running[@]} > 0 ]];then + out3+=("^sep($RUNNING_CONKYS)") + for c in ${running[@]};do + filename=${c##*/} + name=${filename%%_mb*} + title=${name//_/ } + out3+=("$BGCOLOR_OF ${title^},conkyctl win_bgcolor '${i}' '${c}';colorizer -s") + done +fi +else +out2+=("$i ,w2theme accent '${i}';colorizer -s") +fi +done ### TODO Rework below as submenu(edit palette and present palette with HTML helper- to keep it on desktop, allowing to copy colors from it)