From dd52a27ee9435564ca09539a58f08ca3596e3c30 Mon Sep 17 00:00:00 2001 From: nihsx Date: Wed, 20 Apr 2022 19:49:58 +0700 Subject: [PATCH 01/18] add first border function --- awesomeshot | 62 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/awesomeshot b/awesomeshot index d52b36b..662f158 100755 --- a/awesomeshot +++ b/awesomeshot @@ -5,7 +5,7 @@ # # Copyright (c) 2021 - 2022 xShin -version=1.0.5 +version=1.0.6 XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-${HOME}/.config} config_file="${XDG_CONFIG_HOME}/awesomeshot/awesomeshot.conf" @@ -26,8 +26,8 @@ read -rd '' config <<'EOF' # PATH is same with this variable. Default my phone result file # image PATH on "/sdcard/DCIM/Screenshots". If not same, # you can edit this variable value -#screenshot_result_path="/sdcard/Pictures/ScreenMaster" -screenshot_result_path="/sdcard/DCIM/Screenshots" +screenshot_result_path="/sdcard/Pictures/ScreenMaster" +#screenshot_result_path="/sdcard/DCIM/Screenshots" # This variable serves to set the convert image with file type non PNG, change this value # to blank or whatever for disable function and "yes" for enable function. @@ -84,17 +84,30 @@ convert_rounded="yes" # This variable serves to set how many rounded corners border_radius=10 +# This variable serves to convert tiny first border (background image) when editing the image, +# change this value to blank or whatever for disable convert and "yes" for enable function +convert_first_border="yes" + +# This variable serves to set tiny first border color (background image), change this value +# to "none" for transparent background, if you want to custom the color, you can +# change this value with hex color or use the one in the array list. +first_border_color="${hex_color[0]}" + +# This variable serves to set how many size of the first border +# NOTE: make sure this value is small, otherwise it will look weird +first_border_size=7 + # This variable serves to convert border (background image) when editing the image, # change this value to blank or whatever for disable convert and "yes" for enable function -convert_border="yes" +convert_second_border="yes" # This variable serves to set border color (background image), change this value # to "none" for transparent background, if you want to custom the color, you can # change this value with hex color or use the one in the array list. -border_color="${hex_color[0]}" +second_border_color="${hex_color[0]}" -# This variable serves to set how many size of the border -border_size=50 +# This variable serves to set how many size of the second border +second_border_size=50 # This variable serves to convert the shadow of image, change this value # to blank or whatever for disable function and "yes" for enable function. @@ -268,12 +281,17 @@ function autoRun() { convertRounded fi + if [ "${convert_first_border}" == "yes" ]; then + convertFirstBorder + convertRounded + fi + if [ "${convert_shadow}" == "yes" ]; then convertShadow fi - if [ "${convert_border}" == "yes" ]; then - convertBorder + if [ "${convert_second_border}" == "yes" ]; then + convertSecondBorder fi if [ "${convert_footer}" == "yes" ]; then @@ -281,7 +299,7 @@ function autoRun() { fi termux-media-scan "${file_name}" &> /dev/null - termux-toast -b "${border_color}" -c "${footer_foreground}" -g top "${file_name##*/} ✅" + termux-toast -b "${second_border_color}" -c "${footer_foreground}" -g top "${file_name##*/} ✅" termux-notification --action "termux-open '${file_name}'" --icon "camera_enhance" \ --image-path "${file_name}" --priority "high" --title "📸 Awesomeshot v${version}" @@ -324,12 +342,17 @@ function manualRun() { convertRounded fi + if [ "${convert_first_border}" == "yes" ]; then + convertFirstBorder + convertRounded + fi + if [ "${convert_shadow}" == "yes" ]; then convertShadow fi - if [ "${convert_border}" == "yes" ]; then - convertBorder + if [ "${convert_second_border}" == "yes" ]; then + convertSecondBorder fi if [ "${convert_footer}" == "yes" ]; then @@ -337,7 +360,7 @@ function manualRun() { fi termux-media-scan "${file_name}" &> /dev/null - termux-toast -b "${border_color}" -c "${footer_foreground}" -g top "${file_name##*/} ✅" + termux-toast -b "${second_border_color}" -c "${footer_foreground}" -g top "${file_name##*/} ✅" termux-notification --action "termux-open '${file_name}'" --icon "camera_enhance" \ --image-path "${file_name}" --priority "high" --title "📸 Awesomeshot v${version}" @@ -451,6 +474,13 @@ function convertRounded() { check } +function convertFirstBorder() { + subtitle "[+]*Set*Image*First*Border*Color*" + + convert "$file_name" -bordercolor "${first_border_color}" -border ${first_border_size} "$file_name" + check +} + function convertShadow() { subtitle "[+]*Set*Image*Shadow*" @@ -467,10 +497,10 @@ function convertShadow() { check } -function convertBorder() { - subtitle "[+]*Set*Image*Border*Color*" +function convertSecondBorder() { + subtitle "[+]*Set*Image*Second*Border*Color*" - convert "$file_name" -bordercolor "${border_color}" -border ${border_size} "$file_name" + convert "$file_name" -bordercolor "${second_border_color}" -border ${second_border_size} "$file_name" check } From 2b27d378a962164e15084215e5611134ed1e75ed Mon Sep 17 00:00:00 2001 From: nihsx Date: Wed, 20 Apr 2022 19:50:17 +0700 Subject: [PATCH 02/18] update new config for awesomeshot v.1.0.6 --- awesomeshot.conf | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/awesomeshot.conf b/awesomeshot.conf index e2f4a98..bd52d82 100644 --- a/awesomeshot.conf +++ b/awesomeshot.conf @@ -2,8 +2,8 @@ # PATH is same with this variable. Default my phone result file # image PATH on "/sdcard/DCIM/Screenshots". If not same, # you can edit this variable value -#screenshot_result_path="/sdcard/Pictures/ScreenMaster" -screenshot_result_path="/sdcard/DCIM/Screenshots" +screenshot_result_path="/sdcard/Pictures/ScreenMaster" +#screenshot_result_path="/sdcard/DCIM/Screenshots" # This variable serves to set the convert image with file type non PNG, change this value # to blank or whatever for disable function and "yes" for enable function. @@ -60,17 +60,30 @@ convert_rounded="yes" # This variable serves to set how many rounded corners border_radius=10 +# This variable serves to convert tiny first border (background image) when editing the image, +# change this value to blank or whatever for disable convert and "yes" for enable function +convert_first_border="yes" + +# This variable serves to set tiny first border color (background image), change this value +# to "none" for transparent background, if you want to custom the color, you can +# change this value with hex color or use the one in the array list. +first_border_color="${hex_color[0]}" + +# This variable serves to set how many size of the first border +# NOTE: make sure this value is small, otherwise it will look weird +first_border_size=7 + # This variable serves to convert border (background image) when editing the image, # change this value to blank or whatever for disable convert and "yes" for enable function -convert_border="yes" +convert_second_border="yes" # This variable serves to set border color (background image), change this value # to "none" for transparent background, if you want to custom the color, you can # change this value with hex color or use the one in the array list. -border_color="${hex_color[0]}" +second_border_color="${hex_color[0]}" -# This variable serves to set how many size of the border -border_size=50 +# This variable serves to set how many size of the second border +second_border_size=50 # This variable serves to convert the shadow of image, change this value # to blank or whatever for disable function and "yes" for enable function. From 6e1efdd34dac57e3ea745b55668497dfad0cabaa Mon Sep 17 00:00:00 2001 From: nihsx Date: Wed, 20 Apr 2022 20:25:20 +0700 Subject: [PATCH 03/18] update help argument for awesomeshot v.1.0.7 --- awesomeshot | 124 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 118 insertions(+), 6 deletions(-) diff --git a/awesomeshot b/awesomeshot index 662f158..a0f7d5d 100755 --- a/awesomeshot +++ b/awesomeshot @@ -5,7 +5,7 @@ # # Copyright (c) 2021 - 2022 xShin -version=1.0.6 +version=1.0.7 XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-${HOME}/.config} config_file="${XDG_CONFIG_HOME}/awesomeshot/awesomeshot.conf" @@ -566,13 +566,125 @@ function help() { awesomeshot [args] [file] META OPTIONS: - -h, --help Show list of command-line options - -v, --version Show version of awesomeshot + -h, --help Show list of command-line options + -v, --version Show version of awesomeshot RUN OPTIONS: - -a, --auto Run awesomeshot with automatic while take screenshot - -m, --manual Run awesomeshot with manual (this option require filename) - -c, --config Generate default config awesomeshot.conf + -a, --auto Run awesomeshot with automatic while take screenshot + -m, --manual Run awesomeshot with manual (this option require filename) + -c, --config Generate default config awesomeshot.conf + + CONFIG OPTIONS: + screenshot_result_path Make sure when your phone screenshot the result file image + PATH is same with this variable. Default my phone result file + image PATH on '/sdcard/DCIM/Screenshots'. If not same, + you can edit this variable value + + convert_to_png This variable serves to set the convert image with file type non PNG, change this value + to blank or whatever for disable function and 'yes' for enable function. + Convert to PNG if file not PNG + + backup This variable serves to function to backup original photo + (screenshot result), change this value to blank or whatever for disable + function and 'yes' for enable function + + path_backup This variable serves to set the original photo backup PATH + + hex_color Array Hex Color + + convert_titlebar This variable serves to convert title bar when editing the image, change this value + to blank or whatever for disable convert and 'yes' for enable function + + add_on_img This variable serves to set where the title bar place, if 'yes' the title bar add on image, + if blank or whatever the title bar will be added at out of image + + width_img & height_img This variable serves to set the width and height size of title bar. + NOTE (Bug Found): + - Sometimes the title bar result is too big or too small + width_img=magick file_name - format '%w' info: + height_img=magick file_name - format '%h' info: + if (( width_img > height_img )); then + height_img=width_img + elif (( width_img < height_img )); then + width_img=height_img + fi + + titlebar_color This variable serves to set titlebar color, if you want to custom the color, you can + change this value with hex color or use the one in the array list. + + convert_rounded This variable serves to convert rounded corner, change this value + to blank or whatever for disable convert and 'yes' for enable function + + border_radius This variable serves to set how many rounded corners + + convert_first_border This variable serves to convert tiny first border (background image) when editing the image, + change this value to blank or whatever for disable convert and 'yes' for enable function + + first_border_color This variable serves to set tiny first border color (background image), change this value + to 'none' for transparent background, if you want to custom the color, you can + change this value with hex color or use the one in the array list. + + first_border_size This variable serves to set how many size of the first border + NOTE: make sure this value is small, otherwise it will look weird + + convert_second_border This variable serves to convert border (background image) when editing the image, + change this value to blank or whatever for disable convert and 'yes' for enable function + + second_border_color This variable serves to set border color (background image), change this value + to 'none' for transparent background, if you want to custom the color, you can + change this value with hex color or use the one in the array list. + + second_border_size This variable serves to set how many size of the second border + + convert_shadow This variable serves to convert the shadow of image, change this value + to blank or whatever for disable function and 'yes' for enable function. + + shadow_color This variable serves to set shadow color, if you want to custom the color, you can + change this value with hex color or use the one in the array list. + + shadow_size This variable serves to set shadow size, this variable has four values: + shadow_size='75x30+0+30' + that mean: + - bottom shadow is x75 + - right shadow is +30 + - top shadow is +0 + - left shadow is +30 + + convert_footer This variable serves to convert the footer text, change this value + to blank or whatever for disable function and 'yes' for enable function. + + footer_text This variable serves to set text of footer, if you want to use icon + you can search on Nerd Fonts Website (https://www.nerdfonts.com/cheat-sheet) + NOTE: if you use icon from Nerd Fonts, make sure 'footer_font' using nerd fonts to! + + footer_position This variable serves to set text position of footer, the value contain 8 wind direction: + - NorthWest + - North + - West + - Center + - East + - SouthWest + - South + - SouthEast + NOTE: Default value is 'South' + + footer_xy This variable serves to set position of 'X' and 'Y' + + footer_font This variable serves to set the font used when converting, you can check the list font + available to use for ImageMagick by command: + magick convert -list font | grep -iE 'font:.*' + + footer_font_size This variable serves to set font size + + footer_foreground This variable serves to set the text color, if you want to custom the color, you can + change this value with hex color or use the one in the array list. + + footer_background This variable serves to set footer background color (background text), change this value + to 'none' for transparent background, if you want to custom the color, you can + change this value with hex color or use the one in the array list. + + open_image This variable serves to open the result of image (when editing finished), change this value + to blank or whatever for disable function and 'yes' for enable function. " } From 0057436e51e91cd25f31f77b3507894f8e90bc6c Mon Sep 17 00:00:00 2001 From: nihsx Date: Wed, 20 Apr 2022 23:24:13 +0700 Subject: [PATCH 04/18] update man (manual) page version --- awesomeshot.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awesomeshot.1 b/awesomeshot.1 index 2559b09..f1e6c16 100644 --- a/awesomeshot.1 +++ b/awesomeshot.1 @@ -1,4 +1,4 @@ -.TH AWESOMESHOT 1 "18 April 2022" "Awesomeshot 1.0.5" "User Commands" +.TH AWESOMESHOT 1 "20 April 2022" "Awesomeshot 1.0.8" "User Commands" .SH NAME Awesomeshot .SH SYNOPSIS From e385c3213e525f6d423a36bbcf4ead7a0b990450 Mon Sep 17 00:00:00 2001 From: nihsx Date: Wed, 20 Apr 2022 23:46:23 +0700 Subject: [PATCH 05/18] fix backup original photo v.1.0.8 --- awesomeshot | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/awesomeshot b/awesomeshot index a0f7d5d..116a50c 100755 --- a/awesomeshot +++ b/awesomeshot @@ -5,7 +5,7 @@ # # Copyright (c) 2021 - 2022 xShin -version=1.0.7 +version=1.0.8 XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-${HOME}/.config} config_file="${XDG_CONFIG_HOME}/awesomeshot/awesomeshot.conf" @@ -299,7 +299,7 @@ function autoRun() { fi termux-media-scan "${file_name}" &> /dev/null - termux-toast -b "${second_border_color}" -c "${footer_foreground}" -g top "${file_name##*/} ✅" + termux-toast -b "${hex_color[0]}" -c "${hex_color[1]}" -g top "${file_name##*/} ✅" termux-notification --action "termux-open '${file_name}'" --icon "camera_enhance" \ --image-path "${file_name}" --priority "high" --title "📸 Awesomeshot v${version}" @@ -315,6 +315,10 @@ function autoRun() { done } +function getPwd() { + pwd=$(pwd) +} + function manualRun() { getUserConfig header @@ -324,12 +328,12 @@ function manualRun() { check if [ "${convert_to_png}" == "yes" ]; then - convertToPng "${get_file_name}" + convertToPng fi if [ "${backup}" == "yes" ]; then title "${COLOR_SKY}[+] BACKUP IMAGE${COLOR_DEFAULT}" - backupOriginalPhoto "${get_file_name}" + backupOriginalPhoto "${file_name}" fi title "${COLOR_SKY}[+] EDITING IMAGE${COLOR_DEFAULT}" @@ -360,7 +364,7 @@ function manualRun() { fi termux-media-scan "${file_name}" &> /dev/null - termux-toast -b "${second_border_color}" -c "${footer_foreground}" -g top "${file_name##*/} ✅" + termux-toast -b "${hex_color[0]}" -c "${hex_color[1]}" -g top "${file_name} ✅" termux-notification --action "termux-open '${file_name}'" --icon "camera_enhance" \ --image-path "${file_name}" --priority "high" --title "📸 Awesomeshot v${version}" @@ -377,14 +381,15 @@ function manualRun() { function backupOriginalPhoto() { change_filename_backup=$(echo $1 | sed 's/.png/_backup.png/g') + get_filename_suffix=${change_filename_backup##*/} if [ ! -d ${path_backup} ]; then mkdir -p "${path_backup}" fi - cp "${file_name}" "${path_backup}/${change_filename_backup}" + cp "${file_name}" "${path_backup}/${get_filename_suffix}" - if [ -f ${path_backup}/${change_filename_backup} ]; then + if [ -f ${path_backup}/${get_filename_suffix} ]; then subtitle "[+]*Backup*File*" check @@ -701,7 +706,8 @@ case "${1}" in ;; -m|--manual ) if [ ${2} ]; then - file_name="${2}" + getPwd + file_name="${pwd}/${2}" main manualRun else echo "" From 8cbf67a300803e381d2bf75967a8292ca012053f Mon Sep 17 00:00:00 2001 From: nihsx Date: Thu, 21 Apr 2022 00:38:34 +0700 Subject: [PATCH 06/18] update man (manual) page v1.0.8 --- awesomeshot.1 | 268 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 265 insertions(+), 3 deletions(-) diff --git a/awesomeshot.1 b/awesomeshot.1 index f1e6c16..7dfb328 100644 --- a/awesomeshot.1 +++ b/awesomeshot.1 @@ -1,11 +1,35 @@ .TH AWESOMESHOT 1 "20 April 2022" "Awesomeshot 1.0.8" "User Commands" + .SH NAME Awesomeshot + .SH SYNOPSIS .B awesomeshot \fI\,[args] [file]\/\fR + .SH DESCRIPTION Awesomeshot \- A command-line screenshot tool written in bash 5.1.16+ + +.SH "HOW AWESOMESHOT WORK?" +\fI\,https://github.com/mayTermux/awesomeshot/issues/2#issuecomment-1052047095\/\fR + +.SH "WIKI OR DOCS" +\fI\,https://github.com/mayTermux/awesomeshot/wiki\/\fR + +.SH "REPORTING BUGS" + +Report bugs to +.IP + +\fI\,https://github.com/mayTermux/awesomeshot/issues\/\fR + +.SH "SHOWCASE" + +Upload your custom config or script +.IP + +\fI\,https://github.com/mayTermux/awesomeshot/issues/4\/\fR + .SH META OPTIONS \fB\-h, \-\-help\fR .IP @@ -14,6 +38,7 @@ Show list of command-line options \fB\-v, \-\-version\fR .IP Show version of awesomeshot + .SH RUN OPTIONS \fB\-a, \-\-auto\fR .IP @@ -26,7 +51,244 @@ Run awesomeshot with manual (this option require filename) \fB\-c, \-\-config\fR .IP Generate default config \fI\,awesomeshot.conf\/\fR -.SH "REPORTING BUGS" -Report bugs to + +.SH CONFIG OPTIONS + +\fB\/screenshot_result_path\fR .IP -\fI\,https://github.com/mayTermux/awesomeshot/issues\/\fR +Make sure when your phone screenshot the result file image\fR +PATH is same with this variable. Default my phone result file\fR +image PATH on +.IP +"/sdcard/DCIM/Screenshots" +.IP +If not same,\fR +you can edit this variable value\fR + +.TP +\fB\/convert_to_png\fR +.IP +This variable serves to set the convert image with file type non PNG, change this value\fR +to blank or whatever for disable function and "yes" for enable function.\fR +Convert to PNG if file not PNG\fR + +.TP +\fB\/backup\fR +.IP +This variable serves to function to backup original photo\fR +(screenshot result), change this value to blank or whatever for disable\fR +function and 'yes' for enable function\fR + +.TP +\fB\/path_backup\fR +.IP +This variable serves to set the original photo backup PATH\fR + +.TP +\fB\/hex_color\fR +.IP +Array Hex Color\fR + +.TP +\fB\/convert_titlebar\fR +.IP +This variable serves to convert title bar when editing the image, change this value\fR +to blank or whatever for disable convert and 'yes' for enable function\fR + +.TP +\fB\/add_on_img\fR +.IP +This variable serves to set where the title bar place, if 'yes' the title bar add on image,\fR +if blank or whatever the title bar will be added at out of image\fR + +.TP +\fB\/width_img & height_img\fR +.IP +This variable serves to set the width and height size of title bar.\fR +.IP +NOTE (Bug Found): +.IP +- Sometimes the title bar result is too big or too small +.IP +width_img=$(magick file_name - format '%w' info:) +.IP +height_img=$(magick file_name - format '%h' info:) +.IP +if (( ${width_img} > ${height_img} )); then +.IP + height_img=${width_img} +.IP +elif (( ${width_img} < ${height_img} )); then +.IP + width_img=${height_img} +.IP +fi\fR + +.TP +\fB\/titlebar_color\fR +.IP +This variable serves to set titlebar color, if you want to custom the color, you can +change this value with hex color or use the one in the array list.\fR + +.TP +\fB\/convert_rounded\fR +.IP +This variable serves to convert rounded corner, change this value +to blank or whatever for disable convert and 'yes' for enable function +\fR + +.TP +\fB\/convert_radius\fR +.IP +This variable serves to set how many rounded corners +\fR + +.TP +\fB\/convert_first_border\fR +.IP +This variable serves to convert tiny first border (background image) when editing the image, +change this value to blank or whatever for disable convert and 'yes' for enable function +\fR + +.TP +\fB\/first_border_color\fR +.IP +This variable serves to set tiny first border color (background image), change this value +to 'none' for transparent background, if you want to custom the color, you can +change this value with hex color or use the one in the array list. +\fR + +.TP +\fB\/first_border_size\fR +.IP +This variable serves to set how many size of the first border +NOTE: make sure this value is small, otherwise it will look weird +\fR + +.TP +\fB\/convert_second_border\fR +.IP +This variable serves to convert border (background image) when editing the image, +change this value to blank or whatever for disable convert and 'yes' for enable function +\fR + +.TP +\fB\/second_border_color\fR +.IP +This variable serves to set border color (background image), change this value +to 'none' for transparent background, if you want to custom the color, you can +change this value with hex color or use the one in the array list. +\fR + +.TP +\fB\/second_border_size\fR +.IP +This variable serves to set how many size of the second border +\fR + +.TP +\fB\/convert_shadow\fR +.IP +This variable serves to convert the shadow of image, change this value +to blank or whatever for disable function and 'yes' for enable function. +\fR + +.TP +\fB\/shadow_color\fR +.IP +This variable serves to set shadow color, if you want to custom the color, you can +change this value with hex color or use the one in the array list. +\fR + +.TP +\fb\/shadow_size\fR +.IP +This variable serves to set shadow size, this variable has four values: +shadow_size='75x30+0+30' +that mean: +- bottom shadow is x75 +- right shadow is +30 +- top shadow is +0 +- left shadow is +30 +\fR + +.TP +\fb\/convert_footer\fR +.IP +This variable serves to convert the footer text, change this value +to blank or whatever for disable function and 'yes' for enable function. +\fR + +.TP +\fb\/footer_text\fR +.IP +This variable serves to set text of footer, if you want to use icon +you can search on Nerd Fonts Website (\fI\,https://www.nerdfonts.com/cheat-sheet\fR) +NOTE: if you use icon from Nerd Fonts, make sure 'footer_font' using nerd fonts to! +\fR + +.TP +\fb\/footer_position\fR +.IP +This variable serves to set text position of footer, the value contain 8 wind direction: +- NorthWest +.IP +- North +.IP +- West +.IP +- Center +.IP +- East +.IP +- SouthWest +.IP +- South +.IP +- SouthEast +.IP +NOTE: Default value is 'South' +\fR + +.TP +\fb\/footer_xy\fR +.IP +This variable serves to set position of 'X' and 'Y' +\fR + +.TP +\fb\/footer_font\fR +.IP +This variable serves to set the font used when converting, you can check the list font +available to use for ImageMagick by command: +.IP +magick convert -list font | grep -iE 'font:.*' +\fR + +.TP +\fb\/footer_font_size\fR +.IP +This variable serves to set font size +\fR + +.TP +\fb\/footer_foreground\fR +.IP +This variable serves to set the text color, if you want to custom the color, you can +change this value with hex color or use the one in the array list. +\fR + +.TP +\fb\/footer_background\fR +.IP +This variable serves to set footer background color (background text), change this value +to 'none' for transparent background, if you want to custom the color, you can +change this value with hex color or use the one in the array list. +\fR + +.TP +\fb\/open_image\fR +.IP +This variable serves to open the result of image (when editing finished), change this value +to blank or whatever for disable function and 'yes' for enable function. +\fR \ No newline at end of file From df51d78451cd507fe53b97c3d07e5d4b272bac25 Mon Sep 17 00:00:00 2001 From: nihsx Date: Thu, 21 Apr 2022 00:42:26 +0700 Subject: [PATCH 07/18] update man (manual) page v1.0.8 --- awesomeshot.1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/awesomeshot.1 b/awesomeshot.1 index 7dfb328..6aaec4f 100644 --- a/awesomeshot.1 +++ b/awesomeshot.1 @@ -206,9 +206,13 @@ change this value with hex color or use the one in the array list. This variable serves to set shadow size, this variable has four values: shadow_size='75x30+0+30' that mean: +.IP - bottom shadow is x75 +.IP - right shadow is +30 +.IP - top shadow is +0 +.IP - left shadow is +30 \fR From 3e48ea01da6809443cd0e8109c20c2ddb5fe8b9f Mon Sep 17 00:00:00 2001 From: nihsx Date: Thu, 21 Apr 2022 00:44:39 +0700 Subject: [PATCH 08/18] update man (manual) page v1.0.8 | without new line --- awesomeshot.1 | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/awesomeshot.1 b/awesomeshot.1 index 6aaec4f..e13c4f8 100644 --- a/awesomeshot.1 +++ b/awesomeshot.1 @@ -1,35 +1,23 @@ .TH AWESOMESHOT 1 "20 April 2022" "Awesomeshot 1.0.8" "User Commands" - .SH NAME Awesomeshot - .SH SYNOPSIS .B awesomeshot \fI\,[args] [file]\/\fR - .SH DESCRIPTION Awesomeshot \- A command-line screenshot tool written in bash 5.1.16+ - .SH "HOW AWESOMESHOT WORK?" \fI\,https://github.com/mayTermux/awesomeshot/issues/2#issuecomment-1052047095\/\fR - .SH "WIKI OR DOCS" \fI\,https://github.com/mayTermux/awesomeshot/wiki\/\fR - .SH "REPORTING BUGS" - Report bugs to .IP - \fI\,https://github.com/mayTermux/awesomeshot/issues\/\fR - .SH "SHOWCASE" - Upload your custom config or script .IP - \fI\,https://github.com/mayTermux/awesomeshot/issues/4\/\fR - .SH META OPTIONS \fB\-h, \-\-help\fR .IP @@ -38,7 +26,6 @@ Show list of command-line options \fB\-v, \-\-version\fR .IP Show version of awesomeshot - .SH RUN OPTIONS \fB\-a, \-\-auto\fR .IP @@ -51,9 +38,7 @@ Run awesomeshot with manual (this option require filename) \fB\-c, \-\-config\fR .IP Generate default config \fI\,awesomeshot.conf\/\fR - .SH CONFIG OPTIONS - \fB\/screenshot_result_path\fR .IP Make sure when your phone screenshot the result file image\fR @@ -64,43 +49,36 @@ image PATH on .IP If not same,\fR you can edit this variable value\fR - .TP \fB\/convert_to_png\fR .IP This variable serves to set the convert image with file type non PNG, change this value\fR to blank or whatever for disable function and "yes" for enable function.\fR Convert to PNG if file not PNG\fR - .TP \fB\/backup\fR .IP This variable serves to function to backup original photo\fR (screenshot result), change this value to blank or whatever for disable\fR function and 'yes' for enable function\fR - .TP \fB\/path_backup\fR .IP This variable serves to set the original photo backup PATH\fR - .TP \fB\/hex_color\fR .IP Array Hex Color\fR - .TP \fB\/convert_titlebar\fR .IP This variable serves to convert title bar when editing the image, change this value\fR to blank or whatever for disable convert and 'yes' for enable function\fR - .TP \fB\/add_on_img\fR .IP This variable serves to set where the title bar place, if 'yes' the title bar add on image,\fR if blank or whatever the title bar will be added at out of image\fR - .TP \fB\/width_img & height_img\fR .IP @@ -123,33 +101,28 @@ elif (( ${width_img} < ${height_img} )); then width_img=${height_img} .IP fi\fR - .TP \fB\/titlebar_color\fR .IP This variable serves to set titlebar color, if you want to custom the color, you can change this value with hex color or use the one in the array list.\fR - .TP \fB\/convert_rounded\fR .IP This variable serves to convert rounded corner, change this value to blank or whatever for disable convert and 'yes' for enable function \fR - .TP \fB\/convert_radius\fR .IP This variable serves to set how many rounded corners \fR - .TP \fB\/convert_first_border\fR .IP This variable serves to convert tiny first border (background image) when editing the image, change this value to blank or whatever for disable convert and 'yes' for enable function \fR - .TP \fB\/first_border_color\fR .IP @@ -157,21 +130,18 @@ This variable serves to set tiny first border color (background image), change t to 'none' for transparent background, if you want to custom the color, you can change this value with hex color or use the one in the array list. \fR - .TP \fB\/first_border_size\fR .IP This variable serves to set how many size of the first border NOTE: make sure this value is small, otherwise it will look weird \fR - .TP \fB\/convert_second_border\fR .IP This variable serves to convert border (background image) when editing the image, change this value to blank or whatever for disable convert and 'yes' for enable function \fR - .TP \fB\/second_border_color\fR .IP @@ -179,27 +149,23 @@ This variable serves to set border color (background image), change this value to 'none' for transparent background, if you want to custom the color, you can change this value with hex color or use the one in the array list. \fR - .TP \fB\/second_border_size\fR .IP This variable serves to set how many size of the second border \fR - .TP \fB\/convert_shadow\fR .IP This variable serves to convert the shadow of image, change this value to blank or whatever for disable function and 'yes' for enable function. \fR - .TP \fB\/shadow_color\fR .IP This variable serves to set shadow color, if you want to custom the color, you can change this value with hex color or use the one in the array list. \fR - .TP \fb\/shadow_size\fR .IP @@ -215,14 +181,12 @@ that mean: .IP - left shadow is +30 \fR - .TP \fb\/convert_footer\fR .IP This variable serves to convert the footer text, change this value to blank or whatever for disable function and 'yes' for enable function. \fR - .TP \fb\/footer_text\fR .IP @@ -230,7 +194,6 @@ This variable serves to set text of footer, if you want to use icon you can search on Nerd Fonts Website (\fI\,https://www.nerdfonts.com/cheat-sheet\fR) NOTE: if you use icon from Nerd Fonts, make sure 'footer_font' using nerd fonts to! \fR - .TP \fb\/footer_position\fR .IP @@ -253,13 +216,11 @@ This variable serves to set text position of footer, the value contain 8 wind di .IP NOTE: Default value is 'South' \fR - .TP \fb\/footer_xy\fR .IP This variable serves to set position of 'X' and 'Y' \fR - .TP \fb\/footer_font\fR .IP @@ -268,20 +229,17 @@ available to use for ImageMagick by command: .IP magick convert -list font | grep -iE 'font:.*' \fR - .TP \fb\/footer_font_size\fR .IP This variable serves to set font size \fR - .TP \fb\/footer_foreground\fR .IP This variable serves to set the text color, if you want to custom the color, you can change this value with hex color or use the one in the array list. \fR - .TP \fb\/footer_background\fR .IP @@ -289,7 +247,6 @@ This variable serves to set footer background color (background text), change th to 'none' for transparent background, if you want to custom the color, you can change this value with hex color or use the one in the array list. \fR - .TP \fb\/open_image\fR .IP From 06ecff51b2fa612b17c801dd47c9e2b054edf729 Mon Sep 17 00:00:00 2001 From: nihsx Date: Tue, 26 Apr 2022 23:27:46 +0700 Subject: [PATCH 09/18] awesomeshot: update v.1.0.9 - titlebar text --- awesomeshot | 279 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 187 insertions(+), 92 deletions(-) diff --git a/awesomeshot b/awesomeshot index 116a50c..90635e5 100755 --- a/awesomeshot +++ b/awesomeshot @@ -5,7 +5,7 @@ # # Copyright (c) 2021 - 2022 xShin -version=1.0.8 +version=1.0.9 XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-${HOME}/.config} config_file="${XDG_CONFIG_HOME}/awesomeshot/awesomeshot.conf" @@ -75,18 +75,59 @@ height_img=1000 # This variable serves to set titlebar color, if you want to custom the color, you can # change this value with hex color or use the one in the array list. -titlebar_color="${hex_color[0]}" +titlebar_color="${hex_color[2]}" + +# This variable serves to convert the titlebar text, change this value +# to blank or whatever for disable function and "yes" for enable function. +convert_titlebar_text="yes" + +# This variable serves to set titlebar text, if you want to use icon +# you can search on Nerd Fonts Website (https://www.nerdfonts.com/cheat-sheet) +# NOTE: if you use icon from Nerd Fonts, make sure "titlebar_text_font" using nerd fonts to! +titlebar_text="גּ awesomeshot" + +# This variable serves to set text position of titlebar text, the value contain 8 wind direction: +# - NorthWest +# - North +# - West +# - Center +# - East +# - SouthWest +# - South +# - SouthEast +# NOTE: Default value is "North" +titlebar_text_position="north" + +# This variable serves to set font size +titlebar_text_size="35" + +# This variable serves to set the text color, if you want to custom the color, you can +# change this value with hex color or use the one in the array list. +titlebar_text_color="${hex_color[0]}" + +# This variable serves to set titlebar text background color (background text), change this value +# to "none" for transparent background, if you want to custom the color, you can +# change this value with hex color or use the one in the array list. +titlebar_text_background="none" + +# This variable serves to set the font used when converting, you can check the list font +# available to use for ImageMagick by command: +# - magick convert -list font | grep -iE 'font:.*' +titlebar_text_font="JetBrains-Mono-Medium-Nerd-Font-Complete" + +# This variable serves to set position of "X" and "Y" titlebar text +titlebar_text_xy="+0+5" # This variable serves to convert rounded corner, change this value # to blank or whatever for disable convert and "yes" for enable function convert_rounded="yes" # This variable serves to set how many rounded corners -border_radius=10 +border_radius=20 # This variable serves to convert tiny first border (background image) when editing the image, # change this value to blank or whatever for disable convert and "yes" for enable function -convert_first_border="yes" +convert_first_border="" # This variable serves to set tiny first border color (background image), change this value # to "none" for transparent background, if you want to custom the color, you can @@ -128,7 +169,7 @@ shadow_size="75x30+0+30" # This variable serves to convert the footer text, change this value # to blank or whatever for disable function and "yes" for enable function. -convert_footer="yes" +convert_footer="" # This variable serves to set text of footer, if you want to use icon # you can search on Nerd Fonts Website (https://www.nerdfonts.com/cheat-sheet) @@ -275,6 +316,9 @@ function autoRun() { if [ "${convert_titlebar}" == "yes" ]; then convertTitleBar + if [ "${convert_titlebar_text}" == "yes" ]; then + convertTitleBarText + fi fi if [ "${convert_rounded}" == "yes" ]; then @@ -340,6 +384,9 @@ function manualRun() { if [ "${convert_titlebar}" == "yes" ]; then convertTitleBar + if [ "${convert_titlebar_text}" == "yes" ]; then + convertTitleBarText + fi fi if [ "${convert_rounded}" == "yes" ]; then @@ -466,6 +513,21 @@ function convertTitleBar(){ check } +function convertTitleBarText() { + subtitle "[+]*Set*Title*Bar*Text" + + echo -n "${titlebar_text}" | + convert "${file_name}" \ + -gravity "${titlebar_text_position}" \ + -pointsize "${titlebar_text_size}" \ + -fill "${titlebar_text_color}" \ + -undercolor "${titlebar_text_background}" \ + -font "${titlebar_text_font}" \ + -annotate "${titlebar_text_xy}" \ + @- "${file_name}" + check +} + function convertRounded() { subtitle "[+]*Set*Rounded*Corner*" @@ -571,125 +633,158 @@ function help() { awesomeshot [args] [file] META OPTIONS: - -h, --help Show list of command-line options - -v, --version Show version of awesomeshot + -h, --help Show list of command-line options + -v, --version Show version of awesomeshot RUN OPTIONS: - -a, --auto Run awesomeshot with automatic while take screenshot - -m, --manual Run awesomeshot with manual (this option require filename) - -c, --config Generate default config awesomeshot.conf + -a, --auto Run awesomeshot with automatic while take screenshot + -m, --manual Run awesomeshot with manual (this option require filename) + -c, --config Generate default config awesomeshot.conf CONFIG OPTIONS: - screenshot_result_path Make sure when your phone screenshot the result file image - PATH is same with this variable. Default my phone result file - image PATH on '/sdcard/DCIM/Screenshots'. If not same, - you can edit this variable value + screenshot_result_path Make sure when your phone screenshot the result file image + PATH is same with this variable. Default my phone result file + image PATH on '/sdcard/DCIM/Screenshots'. If not same, + you can edit this variable value + + convert_to_png This variable serves to set the convert image with file type non PNG, change this value + to blank or whatever for disable function and 'yes' for enable function. + Convert to PNG if file not PNG + + backup This variable serves to function to backup original photo + (screenshot result), change this value to blank or whatever for disable + function and 'yes' for enable function + + path_backup This variable serves to set the original photo backup PATH + + hex_color Array Hex Color + + convert_titlebar This variable serves to convert title bar when editing the image, change this value + to blank or whatever for disable convert and 'yes' for enable function + + add_on_img This variable serves to set where the title bar place, if 'yes' the title bar add on image, + if blank or whatever the title bar will be added at out of image + + width_img & height_img This variable serves to set the width and height size of title bar. + NOTE (Bug Found): + - Sometimes the title bar result is too big or too small + width_img=magick file_name - format '%w' info: + height_img=magick file_name - format '%h' info: + if (( width_img > height_img )); then + height_img=width_img + elif (( width_img < height_img )); then + width_img=height_img + fi + + titlebar_color This variable serves to set titlebar color, if you want to custom the color, you can + change this value with hex color or use the one in the array list. - convert_to_png This variable serves to set the convert image with file type non PNG, change this value - to blank or whatever for disable function and 'yes' for enable function. - Convert to PNG if file not PNG + convert_titlebar_text This variable serves to convert the titlebar text, change this value + to blank or whatever for disable function and 'yes' for enable function. - backup This variable serves to function to backup original photo - (screenshot result), change this value to blank or whatever for disable - function and 'yes' for enable function + titlebar_text This variable serves to set titlebar text, if you want to use icon + you can search on Nerd Fonts Website (https://www.nerdfonts.com/cheat-sheet) + NOTE: if you use icon from Nerd Fonts, make sure 'titlebar_text_font' using nerd fonts to! - path_backup This variable serves to set the original photo backup PATH + titlebar_text_position This variable serves to set text position of titlebar text, the value contain 8 wind direction: + - NorthWest + - North + - West + - Center + - East + - SouthWest + - South + - SouthEast + NOTE: Default value is 'North' - hex_color Array Hex Color + titlebar_text_size This variable serves to set font size - convert_titlebar This variable serves to convert title bar when editing the image, change this value - to blank or whatever for disable convert and 'yes' for enable function + titlebar_text_color This variable serves to set the text color, if you want to custom the color, you can + change this value with hex color or use the one in the array list. - add_on_img This variable serves to set where the title bar place, if 'yes' the title bar add on image, - if blank or whatever the title bar will be added at out of image + titlebar_text_background This variable serves to set titlebar text background color (background text), change this value + to 'none' for transparent background, if you want to custom the color, you can + change this value with hex color or use the one in the array list. - width_img & height_img This variable serves to set the width and height size of title bar. - NOTE (Bug Found): - - Sometimes the title bar result is too big or too small - width_img=magick file_name - format '%w' info: - height_img=magick file_name - format '%h' info: - if (( width_img > height_img )); then - height_img=width_img - elif (( width_img < height_img )); then - width_img=height_img - fi + titlebar_text_font This variable serves to set the font used when converting, you can check the list font + available to use for ImageMagick by command: + magick convert -list font | grep -iE 'font:.*' - titlebar_color This variable serves to set titlebar color, if you want to custom the color, you can - change this value with hex color or use the one in the array list. + titlebar_text_xy This variable serves to set position of "X" and "Y" titlebar text - convert_rounded This variable serves to convert rounded corner, change this value - to blank or whatever for disable convert and 'yes' for enable function + convert_rounded This variable serves to convert rounded corner, change this value + to blank or whatever for disable convert and 'yes' for enable function - border_radius This variable serves to set how many rounded corners + border_radius This variable serves to set how many rounded corners - convert_first_border This variable serves to convert tiny first border (background image) when editing the image, - change this value to blank or whatever for disable convert and 'yes' for enable function + convert_first_border This variable serves to convert tiny first border (background image) when editing the image, + change this value to blank or whatever for disable convert and 'yes' for enable function - first_border_color This variable serves to set tiny first border color (background image), change this value - to 'none' for transparent background, if you want to custom the color, you can - change this value with hex color or use the one in the array list. + first_border_color This variable serves to set tiny first border color (background image), change this value + to 'none' for transparent background, if you want to custom the color, you can + change this value with hex color or use the one in the array list. - first_border_size This variable serves to set how many size of the first border - NOTE: make sure this value is small, otherwise it will look weird + first_border_size This variable serves to set how many size of the first border + NOTE: make sure this value is small, otherwise it will look weird - convert_second_border This variable serves to convert border (background image) when editing the image, - change this value to blank or whatever for disable convert and 'yes' for enable function + convert_second_border This variable serves to convert border (background image) when editing the image, + change this value to blank or whatever for disable convert and 'yes' for enable function - second_border_color This variable serves to set border color (background image), change this value - to 'none' for transparent background, if you want to custom the color, you can - change this value with hex color or use the one in the array list. + second_border_color This variable serves to set border color (background image), change this value + to 'none' for transparent background, if you want to custom the color, you can + change this value with hex color or use the one in the array list. - second_border_size This variable serves to set how many size of the second border + second_border_size This variable serves to set how many size of the second border - convert_shadow This variable serves to convert the shadow of image, change this value - to blank or whatever for disable function and 'yes' for enable function. + convert_shadow This variable serves to convert the shadow of image, change this value + to blank or whatever for disable function and 'yes' for enable function. - shadow_color This variable serves to set shadow color, if you want to custom the color, you can - change this value with hex color or use the one in the array list. + shadow_color This variable serves to set shadow color, if you want to custom the color, you can + change this value with hex color or use the one in the array list. - shadow_size This variable serves to set shadow size, this variable has four values: - shadow_size='75x30+0+30' - that mean: - - bottom shadow is x75 - - right shadow is +30 - - top shadow is +0 - - left shadow is +30 + shadow_size This variable serves to set shadow size, this variable has four values: + shadow_size='75x30+0+30' + that mean: + - bottom shadow is x75 + - right shadow is +30 + - top shadow is +0 + - left shadow is +30 - convert_footer This variable serves to convert the footer text, change this value - to blank or whatever for disable function and 'yes' for enable function. + convert_footer This variable serves to convert the footer text, change this value + to blank or whatever for disable function and 'yes' for enable function. - footer_text This variable serves to set text of footer, if you want to use icon - you can search on Nerd Fonts Website (https://www.nerdfonts.com/cheat-sheet) - NOTE: if you use icon from Nerd Fonts, make sure 'footer_font' using nerd fonts to! + footer_text This variable serves to set text of footer, if you want to use icon + you can search on Nerd Fonts Website (https://www.nerdfonts.com/cheat-sheet) + NOTE: if you use icon from Nerd Fonts, make sure 'footer_font' using nerd fonts to! - footer_position This variable serves to set text position of footer, the value contain 8 wind direction: - - NorthWest - - North - - West - - Center - - East - - SouthWest - - South - - SouthEast - NOTE: Default value is 'South' + footer_position This variable serves to set text position of footer, the value contain 8 wind direction: + - NorthWest + - North + - West + - Center + - East + - SouthWest + - South + - SouthEast + NOTE: Default value is 'South' - footer_xy This variable serves to set position of 'X' and 'Y' + footer_xy This variable serves to set position of 'X' and 'Y' - footer_font This variable serves to set the font used when converting, you can check the list font - available to use for ImageMagick by command: - magick convert -list font | grep -iE 'font:.*' + footer_font This variable serves to set the font used when converting, you can check the list font + available to use for ImageMagick by command: + magick convert -list font | grep -iE 'font:.*' - footer_font_size This variable serves to set font size + footer_font_size This variable serves to set font size - footer_foreground This variable serves to set the text color, if you want to custom the color, you can - change this value with hex color or use the one in the array list. + footer_foreground This variable serves to set the text color, if you want to custom the color, you can + change this value with hex color or use the one in the array list. - footer_background This variable serves to set footer background color (background text), change this value - to 'none' for transparent background, if you want to custom the color, you can - change this value with hex color or use the one in the array list. + footer_background This variable serves to set footer background color (background text), change this value + to 'none' for transparent background, if you want to custom the color, you can + change this value with hex color or use the one in the array list. - open_image This variable serves to open the result of image (when editing finished), change this value - to blank or whatever for disable function and 'yes' for enable function. + open_image This variable serves to open the result of image (when editing finished), change this value + to blank or whatever for disable function and 'yes' for enable function. " } From bc48d1bb427f42013e8c281ea75c54b0d6aa2532 Mon Sep 17 00:00:00 2001 From: nihsx Date: Tue, 26 Apr 2022 23:28:17 +0700 Subject: [PATCH 10/18] awesomeshot: update man (manual) page v.1.0.9 --- awesomeshot.1 | 109 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 1 deletion(-) diff --git a/awesomeshot.1 b/awesomeshot.1 index e13c4f8..0b7ae9e 100644 --- a/awesomeshot.1 +++ b/awesomeshot.1 @@ -1,23 +1,31 @@ -.TH AWESOMESHOT 1 "20 April 2022" "Awesomeshot 1.0.8" "User Commands" +.TH AWESOMESHOT 1 "26 April 2022" "Awesomeshot 1.0.9" "User Commands" + .SH NAME Awesomeshot + .SH SYNOPSIS .B awesomeshot \fI\,[args] [file]\/\fR + .SH DESCRIPTION Awesomeshot \- A command-line screenshot tool written in bash 5.1.16+ + .SH "HOW AWESOMESHOT WORK?" \fI\,https://github.com/mayTermux/awesomeshot/issues/2#issuecomment-1052047095\/\fR + .SH "WIKI OR DOCS" \fI\,https://github.com/mayTermux/awesomeshot/wiki\/\fR + .SH "REPORTING BUGS" Report bugs to .IP \fI\,https://github.com/mayTermux/awesomeshot/issues\/\fR + .SH "SHOWCASE" Upload your custom config or script .IP \fI\,https://github.com/mayTermux/awesomeshot/issues/4\/\fR + .SH META OPTIONS \fB\-h, \-\-help\fR .IP @@ -26,19 +34,25 @@ Show list of command-line options \fB\-v, \-\-version\fR .IP Show version of awesomeshot + .SH RUN OPTIONS + \fB\-a, \-\-auto\fR .IP Run awesomeshot with automatic while take screenshot .TP + \fB\-m, \-\-manual\fR .IP Run awesomeshot with manual (this option require filename) .TP + \fB\-c, \-\-config\fR .IP Generate default config \fI\,awesomeshot.conf\/\fR + .SH CONFIG OPTIONS + \fB\/screenshot_result_path\fR .IP Make sure when your phone screenshot the result file image\fR @@ -50,36 +64,43 @@ image PATH on If not same,\fR you can edit this variable value\fR .TP + \fB\/convert_to_png\fR .IP This variable serves to set the convert image with file type non PNG, change this value\fR to blank or whatever for disable function and "yes" for enable function.\fR Convert to PNG if file not PNG\fR .TP + \fB\/backup\fR .IP This variable serves to function to backup original photo\fR (screenshot result), change this value to blank or whatever for disable\fR function and 'yes' for enable function\fR .TP + \fB\/path_backup\fR .IP This variable serves to set the original photo backup PATH\fR .TP + \fB\/hex_color\fR .IP Array Hex Color\fR .TP + \fB\/convert_titlebar\fR .IP This variable serves to convert title bar when editing the image, change this value\fR to blank or whatever for disable convert and 'yes' for enable function\fR .TP + \fB\/add_on_img\fR .IP This variable serves to set where the title bar place, if 'yes' the title bar add on image,\fR if blank or whatever the title bar will be added at out of image\fR .TP + \fB\/width_img & height_img\fR .IP This variable serves to set the width and height size of title bar.\fR @@ -102,28 +123,98 @@ elif (( ${width_img} < ${height_img} )); then .IP fi\fR .TP + \fB\/titlebar_color\fR .IP This variable serves to set titlebar color, if you want to custom the color, you can change this value with hex color or use the one in the array list.\fR .TP + +\fb\/convert_titlebar_text\fR +.IP +This variable serves to convert the titlebar text, change this value +to blank or whatever for disable function and "yes" for enable function. +.TP + +\fb\/titlebar_text\fR +.IP +This variable serves to set titlebar text, if you want to use icon +you can search on Nerd Fonts Website (\fI\,https://www.nerdfonts.com/cheat-sheet\fR) +NOTE: if you use icon from Nerd Fonts, make sure "titlebar_text_font" using nerd fonts to! +.TP + +\fb\/titlebar_text_position\fR +.IP +This variable serves to set text position of footer, the value contain 8 wind direction: +- NorthWest +.IP +- North +.IP +- West +.IP +- Center +.IP +- East +.IP +- SouthWest +.IP +- South +.IP +- SouthEast +.IP +NOTE: Default value is 'North' +.TP + +\fB\/titlebar_text_size\fR +.IP +This variable serves to set font size +.TP + +\fB\/titlebar_text_color\fR +.IP +This variable serves to set the text color, if you want to custom the color, you can +change this value with hex color or use the one in the array list. +.TP + +\fB\/titlebar_text_background\fR +This variable serves to set titlebar text background color (background text), change this value +to "none" for transparent background, if you want to custom the color, you can +change this value with hex color or use the one in the array list. +.TP + +\fB\/titlebar_text_font\fR +This variable serves to set the font used when converting, you can check the list font +available to use for ImageMagick by command: +.IP +magick convert -list font | grep -iE 'font:.*' +\fR +.TP + +\fB\/titlebar_text_xy\fR +.IP +This variable serves to set position of "X" and "Y" titlebar text +.TP + \fB\/convert_rounded\fR .IP This variable serves to convert rounded corner, change this value to blank or whatever for disable convert and 'yes' for enable function \fR .TP + \fB\/convert_radius\fR .IP This variable serves to set how many rounded corners \fR .TP + \fB\/convert_first_border\fR .IP This variable serves to convert tiny first border (background image) when editing the image, change this value to blank or whatever for disable convert and 'yes' for enable function \fR .TP + \fB\/first_border_color\fR .IP This variable serves to set tiny first border color (background image), change this value @@ -131,18 +222,21 @@ to 'none' for transparent background, if you want to custom the color, you can change this value with hex color or use the one in the array list. \fR .TP + \fB\/first_border_size\fR .IP This variable serves to set how many size of the first border NOTE: make sure this value is small, otherwise it will look weird \fR .TP + \fB\/convert_second_border\fR .IP This variable serves to convert border (background image) when editing the image, change this value to blank or whatever for disable convert and 'yes' for enable function \fR .TP + \fB\/second_border_color\fR .IP This variable serves to set border color (background image), change this value @@ -150,23 +244,27 @@ to 'none' for transparent background, if you want to custom the color, you can change this value with hex color or use the one in the array list. \fR .TP + \fB\/second_border_size\fR .IP This variable serves to set how many size of the second border \fR .TP + \fB\/convert_shadow\fR .IP This variable serves to convert the shadow of image, change this value to blank or whatever for disable function and 'yes' for enable function. \fR .TP + \fB\/shadow_color\fR .IP This variable serves to set shadow color, if you want to custom the color, you can change this value with hex color or use the one in the array list. \fR .TP + \fb\/shadow_size\fR .IP This variable serves to set shadow size, this variable has four values: @@ -182,12 +280,14 @@ that mean: - left shadow is +30 \fR .TP + \fb\/convert_footer\fR .IP This variable serves to convert the footer text, change this value to blank or whatever for disable function and 'yes' for enable function. \fR .TP + \fb\/footer_text\fR .IP This variable serves to set text of footer, if you want to use icon @@ -195,6 +295,7 @@ you can search on Nerd Fonts Website (\fI\,https://www.nerdfonts.com/cheat-sheet NOTE: if you use icon from Nerd Fonts, make sure 'footer_font' using nerd fonts to! \fR .TP + \fb\/footer_position\fR .IP This variable serves to set text position of footer, the value contain 8 wind direction: @@ -217,11 +318,13 @@ This variable serves to set text position of footer, the value contain 8 wind di NOTE: Default value is 'South' \fR .TP + \fb\/footer_xy\fR .IP This variable serves to set position of 'X' and 'Y' \fR .TP + \fb\/footer_font\fR .IP This variable serves to set the font used when converting, you can check the list font @@ -230,17 +333,20 @@ available to use for ImageMagick by command: magick convert -list font | grep -iE 'font:.*' \fR .TP + \fb\/footer_font_size\fR .IP This variable serves to set font size \fR .TP + \fb\/footer_foreground\fR .IP This variable serves to set the text color, if you want to custom the color, you can change this value with hex color or use the one in the array list. \fR .TP + \fb\/footer_background\fR .IP This variable serves to set footer background color (background text), change this value @@ -248,6 +354,7 @@ to 'none' for transparent background, if you want to custom the color, you can change this value with hex color or use the one in the array list. \fR .TP + \fb\/open_image\fR .IP This variable serves to open the result of image (when editing finished), change this value From 6fc0c3352f6af829eeb24918e94dc216e0a407ed Mon Sep 17 00:00:00 2001 From: nihsx Date: Tue, 26 Apr 2022 23:29:07 +0700 Subject: [PATCH 11/18] awesomeshot: default config v.1.0.9 --- awesomeshot.conf | 49 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/awesomeshot.conf b/awesomeshot.conf index bd52d82..566308c 100644 --- a/awesomeshot.conf +++ b/awesomeshot.conf @@ -51,18 +51,59 @@ height_img=1000 # This variable serves to set titlebar color, if you want to custom the color, you can # change this value with hex color or use the one in the array list. -titlebar_color="${hex_color[0]}" +titlebar_color="${hex_color[2]}" + +# This variable serves to convert the titlebar text, change this value +# to blank or whatever for disable function and "yes" for enable function. +convert_titlebar_text="yes" + +# This variable serves to set titlebar text, if you want to use icon +# you can search on Nerd Fonts Website (https://www.nerdfonts.com/cheat-sheet) +# NOTE: if you use icon from Nerd Fonts, make sure "titlebar_text_font" using nerd fonts to! +titlebar_text="גּ awesomeshot" + +# This variable serves to set text position of titlebar text, the value contain 8 wind direction: +# - NorthWest +# - North +# - West +# - Center +# - East +# - SouthWest +# - South +# - SouthEast +# NOTE: Default value is "North" +titlebar_text_position="north" + +# This variable serves to set font size +titlebar_text_size="35" + +# This variable serves to set the text color, if you want to custom the color, you can +# change this value with hex color or use the one in the array list. +titlebar_text_color="${hex_color[0]}" + +# This variable serves to set titlebar text background color (background text), change this value +# to "none" for transparent background, if you want to custom the color, you can +# change this value with hex color or use the one in the array list. +titlebar_text_background="none" + +# This variable serves to set the font used when converting, you can check the list font +# available to use for ImageMagick by command: +# - magick convert -list font | grep -iE 'font:.*' +titlebar_text_font="JetBrains-Mono-Medium-Nerd-Font-Complete" + +# This variable serves to set position of "X" and "Y" titlebar text +titlebar_text_xy="+0+5" # This variable serves to convert rounded corner, change this value # to blank or whatever for disable convert and "yes" for enable function convert_rounded="yes" # This variable serves to set how many rounded corners -border_radius=10 +border_radius=20 # This variable serves to convert tiny first border (background image) when editing the image, # change this value to blank or whatever for disable convert and "yes" for enable function -convert_first_border="yes" +convert_first_border="" # This variable serves to set tiny first border color (background image), change this value # to "none" for transparent background, if you want to custom the color, you can @@ -104,7 +145,7 @@ shadow_size="75x30+0+30" # This variable serves to convert the footer text, change this value # to blank or whatever for disable function and "yes" for enable function. -convert_footer="yes" +convert_footer="" # This variable serves to set text of footer, if you want to use icon # you can search on Nerd Fonts Website (https://www.nerdfonts.com/cheat-sheet) From 4aea97850fc0e2ccdb13147a814f59ecae14dde3 Mon Sep 17 00:00:00 2001 From: nihsx Date: Tue, 26 Apr 2022 23:43:36 +0700 Subject: [PATCH 12/18] awesomeshot: fix double variable --- awesomeshot | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/awesomeshot b/awesomeshot index 3f7fba1..90635e5 100755 --- a/awesomeshot +++ b/awesomeshot @@ -138,19 +138,6 @@ first_border_color="${hex_color[0]}" # NOTE: make sure this value is small, otherwise it will look weird first_border_size=7 -# This variable serves to convert tiny first border (background image) when editing the image, -# change this value to blank or whatever for disable convert and "yes" for enable function -convert_first_border="yes" - -# This variable serves to set tiny first border color (background image), change this value -# to "none" for transparent background, if you want to custom the color, you can -# change this value with hex color or use the one in the array list. -first_border_color="${hex_color[0]}" - -# This variable serves to set how many size of the first border -# NOTE: make sure this value is small, otherwise it will look weird -first_border_size=7 - # This variable serves to convert border (background image) when editing the image, # change this value to blank or whatever for disable convert and "yes" for enable function convert_second_border="yes" From 323ab06946cdb3306928e9799dd984396e668bc0 Mon Sep 17 00:00:00 2001 From: nihsx Date: Tue, 26 Apr 2022 23:43:51 +0700 Subject: [PATCH 13/18] awesomeshot: fix default config --- awesomeshot.conf | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/awesomeshot.conf b/awesomeshot.conf index 942dd8f..566308c 100644 --- a/awesomeshot.conf +++ b/awesomeshot.conf @@ -114,19 +114,6 @@ first_border_color="${hex_color[0]}" # NOTE: make sure this value is small, otherwise it will look weird first_border_size=7 -# This variable serves to convert tiny first border (background image) when editing the image, -# change this value to blank or whatever for disable convert and "yes" for enable function -convert_first_border="yes" - -# This variable serves to set tiny first border color (background image), change this value -# to "none" for transparent background, if you want to custom the color, you can -# change this value with hex color or use the one in the array list. -first_border_color="${hex_color[0]}" - -# This variable serves to set how many size of the first border -# NOTE: make sure this value is small, otherwise it will look weird -first_border_size=7 - # This variable serves to convert border (background image) when editing the image, # change this value to blank or whatever for disable convert and "yes" for enable function convert_second_border="yes" From b5bf9519cb1fbb78b7071367c422501a2f189a36 Mon Sep 17 00:00:00 2001 From: nihsx Date: Wed, 25 May 2022 13:38:55 +0700 Subject: [PATCH 14/18] gradient color --- awesomeshot | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/awesomeshot b/awesomeshot index 3c02b50..861257c 100755 --- a/awesomeshot +++ b/awesomeshot @@ -158,11 +158,20 @@ convert_second_border="yes" # This variable serves to set border color (background image), change this value # to "none" for transparent background, if you want to custom the color, you can # change this value with hex color or use the one in the array list. -second_border_color="${hex_color[0]}" +#second_border_color="${hex_color[0]}" +second_border_color="none" # This variable serves to set how many size of the second border second_border_size=50 +convert_second_border_gradient="yes" + +second_border_gradient_color=( + "#C850C0" + "#FFCC70" + "#4158D0" +) + # This variable serves to convert the shadow of image, change this value # to blank or whatever for disable function and "yes" for enable function. convert_shadow="yes" @@ -350,6 +359,10 @@ function autoRun() { if [ "${convert_second_border}" == "yes" ]; then convertSecondBorder fi + + if [ "${convert_second_border_gradient}" == "yes" ]; then + convertSecondBorderGradient + fi if [ "${convert_footer}" == "yes" ]; then convertFooter @@ -584,6 +597,30 @@ function convertSecondBorder() { check } +function convertSecondBorderGradient() { + subtitle "[+]*Set*Image*Second*Border*Gradient" + size_wh=$(identify -format %wx%h $file_name) + #echo $size_wh + #width_gradient=$(magick "$file_name" - format '%w' info:) + #height_gradient=$(magick "$file_name" - format '%h' info:) + convert \ + \( \ + xc:${second_border_gradient_color[0]} xc:${second_border_gradient_color[1]} +append \ + \) \ + \( \ + xc:${second_border_gradient_color[2]} xc:${second_border_gradient_color[0]} +append \ + \) -append -size $size_wh \ + xc: +swap -fx 'v.p{i/(w-1),j/(h-1)}' \ + ${XDG_CONFIG_HOME}/awesomeshot/backgrad/interpolate_saddle.png + + #convert \( xc:${second_border_gradient_color[0]} xc:${second_border_gradient_color[1]} +append \) \ + # \( xc:${second_border_gradient_color[2]} xc:${second_border_gradient_color[0]} +append \) -append \ + # -size ${width_gradient}x${height_gradient} xc: +swap -fx 'v.p{i/(w-1),j/(h-1)}' \ + # ${XDG_CONFIG_HOME}/interpolate_sadle.png + composite -gravity center "$file_name" ${XDG_CONFIG_HOME}/awesomeshot/backgrad/interpolate_saddle.png "$file_name" + check +} + function convertFooter() { subtitle "[+]*Set*Image*Footer" echo -n "${footer_text}" | From d0c300f6ce42eebb5cfbca7a344bd1b45bd83c30 Mon Sep 17 00:00:00 2001 From: nihsx Date: Wed, 25 May 2022 14:26:11 +0700 Subject: [PATCH 15/18] gradient color --- awesomeshot | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/awesomeshot b/awesomeshot index 861257c..d067f86 100755 --- a/awesomeshot +++ b/awesomeshot @@ -540,7 +540,7 @@ function convertTitleBar(){ } function convertTitleBarText() { - subtitle "[+]*Set*Title*Bar*Text" + subtitle "[+]*Set*Title*Bar*Text*" echo -n "${titlebar_text}" | convert "${file_name}" \ @@ -598,11 +598,8 @@ function convertSecondBorder() { } function convertSecondBorderGradient() { - subtitle "[+]*Set*Image*Second*Border*Gradient" + subtitle "[+]*Set*Image*Second*Border*Gradient*" size_wh=$(identify -format %wx%h $file_name) - #echo $size_wh - #width_gradient=$(magick "$file_name" - format '%w' info:) - #height_gradient=$(magick "$file_name" - format '%h' info:) convert \ \( \ xc:${second_border_gradient_color[0]} xc:${second_border_gradient_color[1]} +append \ @@ -613,16 +610,12 @@ function convertSecondBorderGradient() { xc: +swap -fx 'v.p{i/(w-1),j/(h-1)}' \ ${XDG_CONFIG_HOME}/awesomeshot/backgrad/interpolate_saddle.png - #convert \( xc:${second_border_gradient_color[0]} xc:${second_border_gradient_color[1]} +append \) \ - # \( xc:${second_border_gradient_color[2]} xc:${second_border_gradient_color[0]} +append \) -append \ - # -size ${width_gradient}x${height_gradient} xc: +swap -fx 'v.p{i/(w-1),j/(h-1)}' \ - # ${XDG_CONFIG_HOME}/interpolate_sadle.png composite -gravity center "$file_name" ${XDG_CONFIG_HOME}/awesomeshot/backgrad/interpolate_saddle.png "$file_name" check } function convertFooter() { - subtitle "[+]*Set*Image*Footer" + subtitle "[+]*Set*Image*Footer*" echo -n "${footer_text}" | convert "$file_name" \ -gravity ${footer_position} \ From d4be00f369a0ed515e3912ac148f6f778e585056 Mon Sep 17 00:00:00 2001 From: nihsx Date: Fri, 27 May 2022 13:46:06 +0700 Subject: [PATCH 16/18] awesomeshot: gradient border color --- awesomeshot | 99 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 87 insertions(+), 12 deletions(-) diff --git a/awesomeshot b/awesomeshot index d067f86..1b36cbd 100755 --- a/awesomeshot +++ b/awesomeshot @@ -5,7 +5,7 @@ # # Copyright (c) 2021 - 2022 xShin -version=1.0.9 +version=1.1.0 XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-${HOME}/.config} config_file="${XDG_CONFIG_HOME}/awesomeshot/awesomeshot.conf" @@ -158,20 +158,42 @@ convert_second_border="yes" # This variable serves to set border color (background image), change this value # to "none" for transparent background, if you want to custom the color, you can # change this value with hex color or use the one in the array list. +# NOTE: if convert_second_border enable and second_border_color value not none +# will be conflict #second_border_color="${hex_color[0]}" second_border_color="none" # This variable serves to set how many size of the second border second_border_size=50 +# This variable serves to convert border with gradient color, +# change this value to blank or whatever for disable convert and "yes" for enable function convert_second_border_gradient="yes" +# This variable serves to convert gradient color method +# More information: https://legacy.imagemagick.org/Usage/misc/ +# List available method: +# - saddle +# - mesh +interpolate_method="saddle" + second_border_gradient_color=( "#C850C0" "#FFCC70" "#4158D0" + "#FE7FAA" ) +saddle_color_top_left="${second_border_gradient_color[0]}" +saddle_color_top_right="${second_border_gradient_color[1]}" +saddle_color_bottom_left="${second_border_gradient_color[2]}" +saddle_color_bottom_right="${second_border_gradient_color[0]}" + +mesh_color_top_left="${second_border_gradient_color[1]}" +mesh_color_top_right="${second_border_gradient_color[1]}" +mesh_color_bottom_left="${second_border_gradient_color[3]}" +mesh_color_bottom_right="${second_border_gradient_color[3]}" + # This variable serves to convert the shadow of image, change this value # to blank or whatever for disable function and "yes" for enable function. convert_shadow="yes" @@ -235,8 +257,9 @@ footer_background="none" open_image="" EOF -# init file_name +# init file_name="" +interpolate_file_name="" function getUserConfig() { @@ -252,6 +275,8 @@ function getUserConfig() { fi + checkConfig + } function generateDefaultConfig() { @@ -597,20 +622,49 @@ function convertSecondBorder() { check } -function convertSecondBorderGradient() { - subtitle "[+]*Set*Image*Second*Border*Gradient*" - size_wh=$(identify -format %wx%h $file_name) +function interpolateSaddle() { + interpolate_file_name="interpolate_saddle" convert \ \( \ - xc:${second_border_gradient_color[0]} xc:${second_border_gradient_color[1]} +append \ + xc:${saddle_color_top_left} xc:${saddle_color_top_right} +append \ \) \ \( \ - xc:${second_border_gradient_color[2]} xc:${second_border_gradient_color[0]} +append \ + xc:${saddle_color_bottom_left} xc:${saddle_color_bottom_right} +append \ \) -append -size $size_wh \ xc: +swap -fx 'v.p{i/(w-1),j/(h-1)}' \ - ${XDG_CONFIG_HOME}/awesomeshot/backgrad/interpolate_saddle.png + ${XDG_CONFIG_HOME}/awesomeshot/backgrad/${interpolate_file_name}.png +} + +function interpolateMesh() { + interpolate_file_name="interpolate_mesh" + convert \ + \( \ + xc:${mesh_color_top_left} xc:${mesh_color_top_right} +append \ + \) \ + \( \ + xc:${mesh_color_bottom_left} xc:${mesh_color_bottom_right} +append \ + \) -append -size ${size_wh} \ + xc: +swap -interpolate Mesh -fx 'v.p{i/(w-1),j/(h-1)}' \ + ${XDG_CONFIG_HOME}/awesomeshot/backgrad/${interpolate_file_name}.png +} + +function convertSecondBorderGradient() { + subtitle "[+]*Set*Image*Second*Border*Gradient*" + size_wh=$(identify -format %wx%h $file_name) + if [ ! -d "${XDG_CONFIG_HOME}/awesomeshot/backgrad" ]; then + mkdir ${XDG_CONFIG_HOME}/awesomeshot/backgrad + fi + + case ${interpolate_method} in + "saddle"|"Saddle" ) + interpolateSaddle + ;; + "mesh"|"Mesh" ) + interpolateMesh + ;; + esac - composite -gravity center "$file_name" ${XDG_CONFIG_HOME}/awesomeshot/backgrad/interpolate_saddle.png "$file_name" + composite -gravity center "$file_name" ${XDG_CONFIG_HOME}/awesomeshot/backgrad/${interpolate_file_name}.png "$file_name" check } @@ -647,15 +701,15 @@ function stat() { if [ "${2}" == "Success" ]; then - echo -e " [ ${COLOR_SUCCESS}${1}${COLOR_DEFAULT} ] > ${3}" + echo -e " [ ${COLOR_SUCCESS}${1}${COLOR_DEFAULT} ]\n ${COLOR_SUCCESS}|\n ╰─${COLOR_DEFAULT} ${3}" elif [ "${2}" == "Warning" ]; then - echo -e " [ ${COLOR_WARNING}${1}${COLOR_DEFAULT} ] > ${3}" + echo -e " [ ${COLOR_WARNING}${1}${COLOR_DEFAULT} ]\n ${COLOR_WARNING}|\n ╰─${COLOR_DEFAULT} ${3}" elif [ "${2}" == "Danger" ]; then - echo -e " [ ${COLOR_DANGER}${1}${COLOR_DEFAULT} ] > ${3}" + echo -e " [ ${COLOR_DANGER}${1}${COLOR_DEFAULT} ]\n ${COLOR_DANGER}|\n ╰─${COLOR_DEFAULT} ${3}" fi @@ -779,6 +833,15 @@ function help() { second_border_size This variable serves to set how many size of the second border + convert_second_border_gradient This variable severs to convert border with gradient color, + change this value to blank or whatever for disable convert and 'yes' for enable function + + interpolate_method This variable serves to convert gradient color method + More information: https://legacy.imagemagick.org/Usage/misc/ + List available method: + - saddle + - mesh + convert_shadow This variable serves to convert the shadow of image, change this value to blank or whatever for disable function and 'yes' for enable function. @@ -835,6 +898,18 @@ function version() { echo -e "awesomeshot v.${version}" } +function checkConfig() { + if [[ $convert_second_border == "yes" && $convert_second_border_gradient == "yes" ]]; then + if [ $second_border_color != "none" ]; then + stat "ERROR" "Danger" "Conflict detected on config '${COLOR_WARNING}convert_second_border${COLOR_DEFAULT}' and '${COLOR_WARNING}convert_second_border_gradient${COLOR_DEFAULT}' enable at the same time" + echo -e " + both variable can be enable if '${COLOR_WARNING}second_border_color${COLOR_DEFAULT}' value is none + " + exit 1 + fi + fi +} + case "${1}" in -a|--auto ) main autoRun From bfd0d2b08edf5ef732eddbef39d454fa26eae5c2 Mon Sep 17 00:00:00 2001 From: nihsx Date: Fri, 27 May 2022 13:46:23 +0700 Subject: [PATCH 17/18] awesomeshot: update man (manual) page v.1.1.0 --- awesomeshot.1 | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/awesomeshot.1 b/awesomeshot.1 index 0b7ae9e..e397a2c 100644 --- a/awesomeshot.1 +++ b/awesomeshot.1 @@ -1,4 +1,4 @@ -.TH AWESOMESHOT 1 "26 April 2022" "Awesomeshot 1.0.9" "User Commands" +.TH AWESOMESHOT 1 "27 May 2022" "Awesomeshot 1.1.0" "User Commands" .SH NAME Awesomeshot @@ -251,6 +251,25 @@ This variable serves to set how many size of the second border \fR .TP +\fB\/convert_second_border_gradient\fR +.IP +This variable severs to convert border with gradient color, +change this value to blank or whatever for disable convert and 'yes' for enable function +\fR +.TP + +\fB\/interpolate_method\fR +.IP +This variable serves to convert gradient color method +More information: (\fI\,https://legacy.imagemagick.org/Usage/misc/\fR) +List available method: +.IP +- saddle +.IP +- mesh +\fR +.TP + \fB\/convert_shadow\fR .IP This variable serves to convert the shadow of image, change this value @@ -359,4 +378,4 @@ change this value with hex color or use the one in the array list. .IP This variable serves to open the result of image (when editing finished), change this value to blank or whatever for disable function and 'yes' for enable function. -\fR \ No newline at end of file +\fR From fba87845dca17b95fdb8a1e16144c0d05e150fb7 Mon Sep 17 00:00:00 2001 From: nihsx Date: Fri, 27 May 2022 13:46:32 +0700 Subject: [PATCH 18/18] awesomeshot: default config v.1.1.0 --- awesomeshot.conf | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/awesomeshot.conf b/awesomeshot.conf index eac2ea4..72424a9 100644 --- a/awesomeshot.conf +++ b/awesomeshot.conf @@ -134,11 +134,42 @@ convert_second_border="yes" # This variable serves to set border color (background image), change this value # to "none" for transparent background, if you want to custom the color, you can # change this value with hex color or use the one in the array list. -second_border_color="${hex_color[0]}" +# NOTE: if convert_second_border enable and second_border_color value not none +# will be conflict +#second_border_color="${hex_color[0]}" +second_border_color="none" # This variable serves to set how many size of the second border second_border_size=50 +# This variable serves to convert border with gradient color, +# change this value to blank or whatever for disable convert and "yes" for enable function +convert_second_border_gradient="yes" + +# This variable serves to convert gradient color method +# More information: https://legacy.imagemagick.org/Usage/misc/ +# List available method: +# - saddle +# - mesh +interpolate_method="saddle" + +second_border_gradient_color=( + "#C850C0" + "#FFCC70" + "#4158D0" + "#FE7FAA" +) + +saddle_color_top_left="${second_border_gradient_color[0]}" +saddle_color_top_right="${second_border_gradient_color[1]}" +saddle_color_bottom_left="${second_border_gradient_color[2]}" +saddle_color_bottom_right="${second_border_gradient_color[0]}" + +mesh_color_top_left="${second_border_gradient_color[1]}" +mesh_color_top_right="${second_border_gradient_color[1]}" +mesh_color_bottom_left="${second_border_gradient_color[3]}" +mesh_color_bottom_right="${second_border_gradient_color[3]}" + # This variable serves to convert the shadow of image, change this value # to blank or whatever for disable function and "yes" for enable function. convert_shadow="yes"