diff --git a/README.md b/README.md index 981b7df..ba86c5f 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ A menu to quickly pick, paste and organize colors (palettes) - gcolor3 - xdg-utils - xclip +- notify-send or better notify-send.sh ## Installation diff --git a/bin/mbxcolors b/bin/mbxcolors index 2291424..c691500 100755 --- a/bin/mbxcolors +++ b/bin/mbxcolors @@ -1,11 +1,10 @@ #!/usr/bin/env bash # Copyright (C) Daniel Napora 2021 -# Dependencies: jgmenu, xdotool, xcolor, gcolor3, xdg-utils, xclip -# TODO do not copy not needed files to ~./config/$ME +# Dependencies: jgmenu, xdotool, xcolor, gcolor3, xdg-utils, xclip, notify-send # TODO Imagick colors - separate menu big around 700 named colors # TODO export to .gpl (GIMP,Inkscape) -VERSION="0.2.2" +VERSION="0.2.3" TEMP_DIR=/tmp/colormenu ME=${0##*/} @@ -15,13 +14,13 @@ CNF_FILE="$CNF_DIR/mbxcolors.cfg" RECENT="$CNF_DIR/recent.clr" USED="$CNF_DIR/.used" LASTPAL="$CNF_DIR/.palette" -[ ! -d "$CNF_DIR" ] && mkdir -p "$CNF_DIR" #&& cp -r /usr/share/mbxcolors/* "$CNF_DIR"/ +[ ! -d "$CNF_DIR" ] && mkdir -p "$CNF_DIR" if [ ! -f $CNF_FILE ]; then cat < ${CNF_FILE} # Paste mode: hex,rgb or rgba format=hex #Action when color is clicked: paste (imadietely) or copy (to clipboard) -action=paste +action=copy #What thing to expose on top of main menu: recently picked colors, last used colors or last used palette expose=picked #Show HTML colors? yes|no @@ -124,7 +123,7 @@ getcolorcode() { mkdir -p $TEMP_DIR FNAME="$TEMP_DIR/${1:1:6}.png" convert -size 100x100 xc:"$1" "$FNAME" - notify-send ColorMenu "$clr" --icon="$FNAME" --expire-time=10000 + notify-send ColorMenu "$clr" --icon="$FNAME" --expire-time=120000 fi echo "$1" > "$USED".tmp # add on top and deduplicate