Skip to content

Customizing Config File

Arman edited this page May 27, 2022 · 25 revisions

The awesomeshot config file contains a variable that gives you total freedom over customizing how an image is edited.

Table of Contents

Config File Location

The awesomeshot config file is $HOME/.config/awesomeshot/awesomeshot.conf and awesomeshot will generate the default config on the first run.

NOTE: Awesomeshot will not replace the config file if already exists, if you want back to default config you can regenerate with argument -c or --config, it will ask Do you want to generate default config [y/N] if config already exists.

awesomeshot -c

Screenshot Result PATH

NOTE: This variable works for argument -a or --auto. Make sure when your phone takes a screenshot the result file image PATH is the same as this variable. Default my phone screenshot result image PATH on /sdcard/Pictures/Screenshots. If not the same, edit this variable value

You can check your default screenshot PATH by:

  1. Take a Screenshot
  2. Go to Gallery
  3. Select album Screenshot
  4. Select the last image
  5. Click menu detail info

doc_2022-04-02_22-45-37

Convert File Screenshot to PNG

This variable serves to set the converted image with file type non PNG, change this value to blank or whatever for disable function and "yes" for enable function.

NOTE: ImageMagick requires a PNG file type to be able to convert, make sure if your default screenshot is not PNG you have to enable this variable

convert_to_png="yes"

Backup Screenshot File

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

backup="yes"

Backup PATH

This variable serves to set the original photo backup PATH

path_backup="/sdcard/DCIM/awesomeshot"

Convert

This variable is option for imagemagick execute

Title Bar

This variable serves to convert the title bar when editing the image, change this value to blank or whatever for disable convert and "yes" for enable function

convert_titlebar="yes"

Add on Image

This variable serves to set where the title bar is placed, if "yes" the title bar add to the image, if blank or whatever the title bar will be added out of the image

add_on_img=""

Width & Height Bar

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, you can calculate the width & height title bar by getting info width & height of the image with ImageMagick and then swap the two positions into variable

 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

Width Bar

width_img=500

Height Bar

height_img=1000

Title Bar 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.

border_color="${hex_color[0]}"

For example I change the Hex Color to Dark Gray by changing the index array list to ${hex_color[2]} or #282C34

Title Bar Light Title Bar Dark
titlebar_white titlebar_dark
  • First Image:
titlebar_color="${hex_color[0]}"
  • Second Image:
titlebar_color="${hex_color[2]}"

Convert Title Bar Text

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"

Title Bar Text

This variable serves to set titlebar text, if you want to use icon you can search on Nerd Fonts Website Nerd Font Cheat Sheet

NOTE: if you use icon from Nerd Fonts, make sure "titlebar_text_font" using nerd fonts to!

titlebar_text="גּ awesomeshot"
Default Text Custom Text
tb_text tb_text2

Text Position

This variable serves to set text position of footer, the value contain 8 wind direction:

  • NorthWest
  • North
  • NortEast
  • West
  • Center
  • East
  • SouthWest
  • South
  • SouthEast
titlebar_text_position="North"
North NorthEast
tb_text2 tb_tp

Text Size

This variable serves to set font size

titlebar_text_size="35"
35 25
tb_text2 tb_tz

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.

titlebar_text_color="${hex_color[0]}"
${hex_color[0]} ${hex_color[4]}
tb_text2 tb_tc

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.

titlebar_text_background="none"
none ${hex_color[4]}
tb_text2 tb_tb

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_text_font="JetBrains-Mono-Medium-Nerd-Font-Complete"

Text XY

This variable serves to set position of "X" and "Y" titlebar text

titlebar_text_xy="+0+5"

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="yes"

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

For example I change the Hex Color to Blue Sky by changing the index array list to ${hex_color[3]} or #A8D7FE

White Blue Sky
neofetch neofetch2

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=50

For example I change the value to lower, it will give minimize background-size

50 15
neofetch2 neofetch2-15

Rounded Corner

This variable serves to convert a 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

2022-04-02_23-02

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="yes"

Second Border Color

This variable serves to set border color (background image), change this valueto '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]}"

For example I change the Hex Color to Blue Sky by changing the index array list to ${hex_color[3]} or #A8D7FE

White Blue Sky
neofetch neofetch2

Second Border Size

This variable serves to set how many size of the second border

second_border_size=50

For example I change the value to lower, it will give minimize background-size

50 15
neofetch2 neofetch2-15

Second Border Gradient Color

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
Saddle Mesh
saddle mesh

Shadow

This variable serves to convert the shadow of the image, change this value to blank or whatever for disable function, and "yes" for enable function.

convert_shadow="yes"

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

For example I switch color between border-color and shadow-color

Border-Color White with Shadow-Color Black Border-Color Black with Shadow-Color White
neofetch neofetch-black
  • First Image:
border_color="${hex_color[0]}"
shadow_color="${hex_color[1]}"
  • Second Image:
border_color="${hex_color[1]}"
shadow_color="${hex_color[0]}"

Shadow Size

This variable serves to set shadow size, this variable has four values:

shadow_size="75x30+0+30"

that mean:

  • the bottom shadow is x75
  • the right shadow is +30
  • the top shadow is +0
  • the left shadow is +30

shadow-size

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="yes"

Footer Text

This variable serves to set the text of the footer, if you want to use an icon you can search on Nerd Font Cheat Sheet.

NOTE: if you use icons from Nerd Fonts, make sure "footer_font" uses nerd fonts too!

footer_text=" Shot by Awesomeshot"
Default Footer Custom Footer
neofetch-footer neofetch-custom-footer

Footer Position

This variable serves to set the text position of the footer, the value contains 8 wind directions:

  • NorthWest
  • North
  • NortEast
  • West
  • Center
  • East
  • SouthWest
  • South
  • SouthEast
footer_position="South"

Footer XY

This variable serves to set the position of "X" and "Y"

NOTE: The first value to define X and the second value to define Y

footer_xy="+0+45"

Footer Font

This variable serves to set the font used when converting, you can check the list of fonts available to use for ImageMagick by command:

magick convert -list font | grep -iE 'font:.*'

love-linux

NOTE: Default value JetBrains-Mono-Medium-Nerd-Font-Complete

footer_font="JetBrains-Mono-Medium-Nerd-Font-Complete"

Footer Font Size

This variable serves to set font size

footer_font_size=25
25 15
love-linux love-linux-15

Footer Foreground

This variable serves to set the text color, if you want to custom the color, you can change this value with a hex color or use the one in the array list.

footer_foreground="${hex_color[1]}"

Footer Background

This variable serves to set footer background color (background text), change this value to "none" for a 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="none"

Open Image After Image Edited

This variable serves to open the result of the image (when editing is finished), change this value to blank or whatever for disable function, and "yes" for enable function.

open_image=""