diff --git a/bin/mbxcolors b/bin/mbxcolors index 402c1e1..7e18266 100755 --- a/bin/mbxcolors +++ b/bin/mbxcolors @@ -156,14 +156,21 @@ palettes() { #out2+=(" $color$name ,$ME getcolorcode '$color' '$file',,,#${palette}") out2+=("$color ,$ME getcolorcode '$color' '$file',,,#${palette}") done < "$file" + if [[ -n "$1" ]] ; then + out2+=("^sep()") + out2+=("Add color... from screen,$ME pickcolor '$file'") + if hash pyuic5 2>/dev/null; then + out2+=("^sep()") + out2+=("Add color from selector...,$ME addcolor") + fi out2+=("^sep()") - out2+=("Add color... (colorpicker),$ME pickcolor '$file'") out2+=("Edit palette file,xdg-open '$file'") out2+=("^sep(Danger zone...)") out2+=("Delete palette: ${palette^},^checkout($tagname-del)") out3+=("^tag($tagname-del)") out3+=("^sep(Are you sure?)") - out3+=("Yes,rm '$file';$ME") + out3+=("Yes,rm '$file';$ME") + fi done #if [[ $# = 0 ]] ; then if [[ -n "$1" ]] ; then @@ -310,7 +317,10 @@ trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS}" EXIT out+=("^sep(mbxcolors [$action $format])") #out+=("^sep( mbx colors [$action $format])") out+=("Pick color from screen...,$ME pickcolor") -out+=("Add color...,$ME addcolor") +if hash pyuic5 2>/dev/null; then +out+=("^sep()") +out+=("Add color from selector...,$ME addcolor") +fi # exposed thing case "$expose" in used)