Skip to content

Commit

Permalink
change default config
Browse files Browse the repository at this point in the history
  • Loading branch information
armandwipangestu committed Aug 4, 2022
1 parent cdfcccd commit 753ecc1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 47 deletions.
45 changes: 19 additions & 26 deletions awesomeshot
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# Copyright (c) 2021 - 2022 xShin

version=1.1.1
version=1.1.3

XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-${HOME}/.config}
config_file="${XDG_CONFIG_HOME}/awesomeshot/awesomeshot.conf"
Expand Down Expand Up @@ -49,6 +49,9 @@ hex_color=(
"#282C34" # black-gray
"#333333" # gray
"#A8D7FE" # blue sky
"#6D6B70" # another gray
"#726A7B" # slate gray
"#A2AAAD"
)
# This variable serves to convert title bar when editing the image, change this value
Expand Down Expand Up @@ -84,7 +87,7 @@ 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"
titlebar_text="Awesomeshot"
# This variable serves to set text position of titlebar text, the value contain 8 wind direction:
# - NorthWest
Expand All @@ -99,11 +102,11 @@ titlebar_text="גּ awesomeshot"
titlebar_text_position="north"
# This variable serves to set font size
titlebar_text_size="35"
titlebar_text_size="30"
# 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]}"
titlebar_text_color="${hex_color[5]}"
# 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
Expand All @@ -113,10 +116,11 @@ 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"
#titlebar_text_font="JetBrains-Mono-Medium-Nerd-Font-Complete"
titlebar_text_font="Falling-Sky"
# This variable serves to set position of "X" and "Y" titlebar text
titlebar_text_xy="+0+5"
titlebar_text_xy="+0+7"
# This variable serves to convert rounded corner, change this value
# to blank or whatever for disable convert and "yes" for enable function
Expand All @@ -127,29 +131,16 @@ 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=""
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]}"
first_border_color="${hex_color[5]}"
# 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 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 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
first_border_size=3
# 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
Expand Down Expand Up @@ -303,11 +294,13 @@ function generateDefaultConfig() {
}

function header() {
printf "\n\n %-18s\n\n" "AWESOMESHOT v${version}"
printf "\n\n %-18s\n" "AWESOMESHOT v${version}"
}

function title() {
echo ""
printf "\n\b\r\033[2K***${1}\n" | sed 's/*/ /g'
echo ""
}

function subtitle() {
Expand All @@ -328,7 +321,7 @@ function check() {
fi
}

function run () {
function run() {
if [ "${convert_to_png}" == "yes" ]; then
convertToPng
fi
Expand Down Expand Up @@ -373,6 +366,7 @@ function run () {
fi

termux-media-scan "${file_name}" &> /dev/null

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}"
Expand Down Expand Up @@ -882,8 +876,7 @@ case "${1}" in
;;
-m|--manual )
if [ ${2} ]; then
getPwd
file_name="${pwd}/${2}"
file_name="${2}"
main manualRun
else
echo ""
Expand Down
33 changes: 12 additions & 21 deletions awesomeshot.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ hex_color=(
"#282C34" # black-gray
"#333333" # gray
"#A8D7FE" # blue sky
"#6D6B70" # another gray
"#726A7B" # slate gray
"#A2AAAD"
)

# This variable serves to convert title bar when editing the image, change this value
Expand Down Expand Up @@ -60,7 +63,7 @@ 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"
titlebar_text="Awesomeshot"

# This variable serves to set text position of titlebar text, the value contain 8 wind direction:
# - NorthWest
Expand All @@ -75,11 +78,11 @@ titlebar_text="גּ awesomeshot"
titlebar_text_position="north"

# This variable serves to set font size
titlebar_text_size="35"
titlebar_text_size="30"

# 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]}"
titlebar_text_color="${hex_color[5]}"

# 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
Expand All @@ -89,10 +92,11 @@ 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"
#titlebar_text_font="JetBrains-Mono-Medium-Nerd-Font-Complete"
titlebar_text_font="Falling-Sky"

# This variable serves to set position of "X" and "Y" titlebar text
titlebar_text_xy="+0+5"
titlebar_text_xy="+0+7"

# This variable serves to convert rounded corner, change this value
# to blank or whatever for disable convert and "yes" for enable function
Expand All @@ -103,29 +107,16 @@ 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=""
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]}"
first_border_color="${hex_color[5]}"

# 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 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 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
first_border_size=3

# 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
Expand Down

0 comments on commit 753ecc1

Please sign in to comment.