diff --git a/bin/colorizer b/bin/colorizer index b411fce..b41e18d 100755 --- a/bin/colorizer +++ b/bin/colorizer @@ -1,10 +1,10 @@ #!/bin/bash out+=("^sep(Mabox Colorizer)") -out+=("OBTHEME,^pipe(colorizer-ob)") -out+=("MENUPANELS,^pipe(colorizer-menus)") +out+=("Openbox Theme,^pipe(colorizer-ob)") +out+=("Menus/Panels,^pipe(colorizer-menus)") #out+=("TINT2,^pipe(colorizer-tint2)") -out+=("CONKY,^pipe(colorizer-conky)") +out+=("Conky,^pipe(colorizer-conky)") #out+=("Systray HW monitor,^pipe(colorizer-phwmon)") out+=("Terminal color scheme,^term(theme.sh -i2;/bin/bash)") #out+=("GTKTHEME,^pipe(colorizer-gtktheme)") diff --git a/bin/colorizer-conky b/bin/colorizer-conky index ab2612f..0f949ed 100755 --- a/bin/colorizer-conky +++ b/bin/colorizer-conky @@ -36,6 +36,11 @@ getvalues () { [[ $CLR1 =~ ^#.* ]] && : || CLR1="#${CLR1}" read CLR2 <<< "$(grep color2 ${BASECONKY} | cut -d'=' -f2 | cut -d"'" -f2)" [[ $CLR2 =~ ^#.* ]] && : || CLR2="#${CLR2}" + read OUTLINE <<< "$(grep draw_outline ${BASECONKY} | cut -d'=' -f2 | cut -d"," -f1)" + read SHADES <<< "$(grep draw_shades ${BASECONKY} | cut -d'=' -f2 | cut -d"," -f1)" + SHADOWS="no" + [[ "$OUTLINE" == "true" ]] && SHADOWS="outline" + [[ "$SHADES" == "true" ]] && SHADOWS="shadow" read BORD <<< "$(grep draw_borders ${BASECONKY} | cut -d'=' -f2 | cut -d"," -f1)" read STIP <<< "$(grep stippled_borders ${BASECONKY} | cut -d'=' -f2 | cut -d"," -f1)" @@ -48,10 +53,10 @@ if pgrep -af "conky.*mbcolor" >/dev/null; then out+=("^sep(Colorize Conky)") out+=("^sep(Global settings (apply to all))") - out+=(" AbCd Default color,^pipe(mbclr '$CLR' conkyctl default_color_all DEFAULT_COLOR '$me')") - out+=(" AbCd Color 0,^pipe(mbclr '$CLR0' conkyctl color0_all COLOR_0 '$me')") - out+=(" AbCd Color 1,^pipe(mbclr '$CLR1' conkyctl color1_all COLOR_1 '$me')") - out+=(" AbCd Color 2,^pipe(mbclr '$CLR2' conkyctl color2_all COLOR_2 '$me')") + out+=(" AbCd Default color (normal text and border),^pipe(mbclr '$CLR' conkyctl default_color_all DEFAULT_COLOR '$me')") + out+=(" AbCd Color 0 (normal text2),^pipe(mbclr '$CLR0' conkyctl color0_all COLOR_0 '$me')") + out+=(" AbCd Color 1 (bigger text),^pipe(mbclr '$CLR1' conkyctl color1_all COLOR_1 '$me')") + out+=(" AbCd Color 2 (bars/graphs),^pipe(mbclr '$CLR2' conkyctl color2_all COLOR_2 '$me')") out+=("^sep()") if [ "$WINTRANS" == false ];then out+=(" AbCd Background,^checkout(trans)") @@ -72,6 +77,8 @@ if pgrep -af "conky.*mbcolor" >/dev/null; then out2+=("^sep()") out2+=("++ Increase,conkyctl basefont_inc_all;$me") out2+=("-- Decrease,conkyctl basefont_dec_all;$me") + out+=("Outline/Shadow [ $SHADOWS ],^checkout(outline)") + out2+=("^tag(outline)") out2+=("^sep(Outline/Shadow)") out2+=("No,conkyctl shades_all no;$me") out2+=("^sep()") diff --git a/bin/colorizer-ob b/bin/colorizer-ob index d4e1e20..547d910 100755 --- a/bin/colorizer-ob +++ b/bin/colorizer-ob @@ -68,25 +68,27 @@ getvalues out+=("^sep(Openbox theme: $OBTHEME)") out+=("^sep(TITLEBAR)") -out+=(" ACTIVE_BG,^pipe(mbclr '$ABG' obtctl clractivebg ACTIVE_BG '$me')") -out+=(" INACTIVE_BG,^pipe(mbclr '$NBG' obtctl clrnormalbg INACTIVE_BG '$me')") -out+=("TEXT,^checkout(titletext)") +out+=(" ACTIVE_BG,^pipe(mbclr '$ABG' obtctl clractivebg ACTIVE_BG '$me')") +out+=(" INACTIVE_BG,^pipe(mbclr '$NBG' obtctl clrnormalbg INACTIVE_BG '$me')") +out+=(" AbCd TITLEBAR TEXT,^checkout(titletext)") out+=("GRADIENT [ ${REST##* } ],^checkout(gradient)") out+=("PADDING [ $PHEIGHT $PWIDTH ],^checkout(padding)") out+=("^sep(BORDER)") -out+=(" ACTIVE_BORDER,^pipe(mbclr '$ALINE' obtctl activeborderColor ACTIVE_BORDER_COLOR '$me')") -out+=(" INACTIVE_BORDER,^pipe(mbclr '$NLINE' obtctl inactiveborderColor INACTIVE_BORDER_COLOR '$me')") +out+=(" ACTIVE_BORDER,^pipe(mbclr '$ALINE' obtctl activeborderColor ACTIVE_BORDER_COLOR '$me')") +out+=(" INACTIVE_BORDER,^pipe(mbclr '$NLINE' obtctl inactiveborderColor INACTIVE_BORDER_COLOR '$me')") out+=("BORDER [ $BORD ],^checkout(border)") out+=("HANDLEWIDTH [ $HANDLE ],^checkout(handlewidth)") out+=("^sep(EFFECTS)") out+=("RAISED? [ $WINRAISED ],^checkout(raised)") out+=("ACTIVEHANDLE? [ $AHANDLE ],^checkout(handle)") -out+=("^sep()") + if [ -f "${THEMERC}.bak" ]; then +out+=("^sep()") out+=("RESET TO DEFAULTS,obtctl reset;$me") fi -out+=("Edit...,xdg-open ${THEMERC}") +#out+=("Edit...,xdg-open ${THEMERC}") + #out2+=("^tag(themes)") #out2+=("^sep(themes)") #for i in $(ls $HOME/.themes);do @@ -96,7 +98,7 @@ out+=("Edit...,xdg-open ${THEMERC}") #done #TEXT out2+=("^tag(titletext)") -out2+=("^sep(TITLE_BAR)") +out2+=("^sep(TITLE_BAR TEXT)") out2+=("FONT...,mb-setfont obtitle;$me") out2+=("TEXTALIGN [ $TXTJUST ],^checkout(talign)") out2+=("SHADOW,^checkout(shadow)") @@ -155,7 +157,7 @@ out2+=("1 (raised),obtctl raised 1;$me") #GRADIENT out2+=("^tag(gradient)") out2+=("^sep(GRADIENT)") -out2+=("solid,obtctl gradient solid;$me") +out2+=("Solid color (no gradient),obtctl gradient solid;$me") out2+=("^sep()") out2+=("Vertical,obtctl gradient vertical;$me") out2+=("Horizontal,obtctl gradient horizontal;$me") diff --git a/bin/conkyctl b/bin/conkyctl index fd524ce..ef57c89 100755 --- a/bin/conkyctl +++ b/bin/conkyctl @@ -202,6 +202,12 @@ single () { [[ $CLR1 =~ ^#.* ]] && : || CLR1="#${CLR1}" read CLR2 <<< "$(grep color2 ${1} | cut -d'=' -f2 | cut -d"'" -f2)" [[ $CLR2 =~ ^#.* ]] && : || CLR2="#${CLR2}" + read OUTLINE <<< "$(grep draw_outline ${1} | cut -d'=' -f2 | cut -d"," -f1)" + read SHADES <<< "$(grep draw_shades ${1} | cut -d'=' -f2 | cut -d"," -f1)" + SHADOWS="no" + [[ "$OUTLINE" == "true" ]] && SHADOWS="outline" + [[ "$SHADES" == "true" ]] && SHADOWS="shadow" + read BORD <<< "$(grep draw_borders ${1} | cut -d'=' -f2 | cut -d"," -f1)" read STIP <<< "$(grep stippled_borders ${1} | cut -d'=' -f2 | cut -d"," -f1)" @@ -246,11 +252,13 @@ single () { fi out+=("^sep(COLORS)") + if [[ "$1" != *"logo_mbcolor"* ]]; then [[ "$CLR" != "#" ]] && out+=(" AbCd Default color,^pipe(mbclr '$CLR' conkyctl default_color DEFAULT_COLOR '$me' ${1})") [[ "$CLR0" != "#" ]] && out+=(" AbCd Color 0,^pipe(mbclr '$CLR0' conkyctl color0 COLOR_0 '$me' ${1})") [[ "$CLR1" != "#" ]] && out+=(" AbCd Color 1,^pipe(mbclr '$CLR1' conkyctl color1 COLOR_1 '$me' ${1})") [[ "$CLR2" != "#" ]] && out+=(" AbCd Color 2,^pipe(mbclr '$CLR2' conkyctl color2 COLOR_2 '$me' ${1})") out+=("^sep()") + fi if [ "$WINTRANS" == false ];then out+=(" AbCd Background,^checkout(transsingle)") else @@ -263,23 +271,26 @@ single () { out2+=("^sep()") out2+=(" Background color,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor WIN_BGCOLOR '$me' ${1})") - out+=("FONTS [ $FONT $FONTSIZE ],^checkout(fontsingle)") - out2+=("^tag(fontsingle)") - out2+=("^sep(BASE_FONT)") - # if "$1" not quote - out2+=("Set custom basefont...,mb-setfont conky_single ${1};$me") - out2+=("^sep()") - # fi - out2+=("++ Increase,conkyctl basefont_inc ${1};$me") - out2+=("-- Decrease,conkyctl basefont_dec ${1};$me") - out2+=("^sep(Outline/Shadow)") - out2+=("No,conkyctl shades no ${1};$me") - out2+=("^sep()") - out2+=("Draw shades,conkyctl shades shadow ${1};$me") - out2+=("Draw outline,conkyctl shades outline ${1};$me") - - - out+=("^sep()") + if [[ "$1" != *"logo_mbcolor"* ]]; then + if [[ "$1" != *"quoter_mbcolor"* ]]; then + out+=("FONT [ $FONT $FONTSIZE ],^checkout(fontsingle)") + out2+=("^tag(fontsingle)") + out2+=("^sep(BASE_FONT)") + + out2+=("Set custom basefont...,mb-setfont conky_single ${1};$me") + out2+=("^sep()") + out2+=("++ Increase,conkyctl basefont_inc ${1};$me") + out2+=("-- Decrease,conkyctl basefont_dec ${1};$me") + fi + out+=("Outline/Shadow [ $SHADOWS ],^checkout(outline2)") + out2+=("^tag(outline2)") + out2+=("^sep(Outline/Shadow)") + out2+=("No,conkyctl shades no ${1};$me") + out2+=("^sep()") + out2+=("Draw shades,conkyctl shades shadow ${1};$me") + out2+=("Draw outline,conkyctl shades outline ${1};$me") + out+=("^sep()") + fi out+=("BORDERS [ $BORD $STIP ],^checkout(bordersingle)") out2+=("^tag(bordersingle)") out2+=("^sep(DRAW BORDERS?)") @@ -293,9 +304,9 @@ single () { out2+=("4,conkyctl stippled_borders 4 ${1};$me") out+=("^sep()") - out+=("EDIT...,xdg-open ${1}") + out+=(" Edit ${1##*/},xdg-open ${1}") out+=("^sep()") - out+=("Kill ${1##*/},conkyctl kill ${1##*/};${me}") + out+=(" Kill ${1##*/},conkyctl kill ${1##*/};${me}") printf '%s\n' "${out[@]}" printf '%s\n' "${out2[@]}" diff --git a/bin/mbclr b/bin/mbclr index a324ce4..7b89382 100755 --- a/bin/mbclr +++ b/bin/mbclr @@ -65,7 +65,8 @@ fi #Current out+=("^sep(SELECT_COLOR)") -out+=(" Select or pick from screen,mbclr pick $2 $3 ${5} ${6}") +out+=(" Pick color from screen,mbclr pixelcolor $2 $3 ${5} ${6}") +out+=(" Select or pick from screen,mbclr pick $2 $3 ${5} ${6}") out+=("^sep()") out+=(" shades of current,^checkout(curshades)") @@ -140,15 +141,29 @@ printf '%s\n' "${out[@]}" printf '%s\n' "${out2[@]}" } pickcolor () { + #notify-send.sh -t 50000 "From pickcolor" "1: $1\n2: $2\n3: $3\n4: $4\n5: $5\n6: $6" color=$(gcolor3 2>/dev/null) if [ "$color" ]; then - mycmd=("$1 $2 '${color}' ${4};${3} -s") + mycmd=("$1 $2 '${color}' ${4};${3}") + fi + eval "${mycmd[@]}" + } +pixelcolor() { + picker=${picker:-gpick} + if [ "$picker" == "gpick" ]; then + command="gpick -pso 2>/dev/null" + else + command="xcolor --preview-size ${size} --scale ${scale}" + fi + color="$(${command})" + if [ -n "${color}" ]; then + mycmd=("$1 $2 '${color}' ${4};${3}") fi eval "${mycmd[@]}" - #notify-send.sh "Qpa $1" "${mycmd[@]}" } case "$1" in - pick) pickcolor "$2" "${3}" "${5}" "${6}";; + pick) pickcolor "$2" "${3}" "${4} ${5}" "${6}";; + pixelcolor) pixelcolor "$2" "${3}" "${4} ${5}" "${6}";; *) main "$@" ;; esac diff --git a/bin/quote.sh b/bin/quote.sh index fa7d51b..38fdaef 100755 --- a/bin/quote.sh +++ b/bin/quote.sh @@ -1,13 +1,23 @@ #!/bin/bash DIR="$HOME/.config/quoter" mkdir -p "$DIR" +CNF_FILE="$DIR/quoter.cfg" +if [ ! -f $CNF_FILE ]; then +cat < ${CNF_FILE} +quote_fontsize=18 +author_fontsize=12 +EOF +fi +source <(grep = $CNF_FILE) +qfsize=${quote_fontsize:-18} +afsize=${author_fontsize:-12} export Q=$(curl -s "http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en" | sed 's|\\||g' ) QUOTE=$(echo $Q | jq .quoteText) AUTOR=$(echo $Q | jq .quoteAuthor | tr -d '"') echo "${QUOTE}|${AUTOR}" >> "${DIR}"/forismatic.txt -printf "\${font Droid Sans:size=18}\${color}" +printf "\${font Droid Sans:size=$qfsize}\${color}" echo ${QUOTE} | fmt -80 -printf "\${font Droid Sans:size=12}\${alignr}\${color0}" +printf "\${font Droid Sans:size=$afsize}\${alignr}\${color0}" echo "— ${AUTOR}"