add upload sound
This commit is contained in:
parent
8378f5b1d6
commit
c037ddc0cd
3 changed files with 29 additions and 3 deletions
|
@ -200,6 +200,7 @@ setup_config() {
|
|||
local show_notifications
|
||||
local save_images
|
||||
local default_option
|
||||
local snip_sound
|
||||
|
||||
echo -ne "${CYAN}What do you want the default option to be? (upload/save/copy): ${RESET}"
|
||||
read default_option
|
||||
|
@ -244,6 +245,16 @@ setup_config() {
|
|||
[[ "$show_notifications" =~ ^(y|Y)$ ]] && show_notifications="true" || show_notifications="false"
|
||||
set_value "SHOW_NOTIFICATIONS" "$show_notifications"
|
||||
|
||||
echo -ne "${CYAN}Do you want to play a sound after upload? (y/n): ${RESET}"
|
||||
read snip_sound
|
||||
while ! [[ "$snip_sound" =~ ^(y|Y|n|N|true|false)$ ]]; do
|
||||
echo -e "${RED}Invalid option. Please enter 'y' or 'n'.${RESET}"
|
||||
echo -ne "${CYAN}Do you want to play a sound after upload? (y/n): ${RESET}"
|
||||
read snip_sound
|
||||
done
|
||||
[[ "$snip_sound" =~ ^(y|Y)$ ]] && snip_sound="true" || snip_sound="false"
|
||||
set_value "SNIP_SOUND" "$snip_sound"
|
||||
|
||||
echo -ne "${CYAN}Do you want to show capture preview? (y/n): ${RESET}"
|
||||
read show_capture_preview
|
||||
while ! [[ "$show_capture_preview" =~ ^(y|Y|n|N|true|false)$ ]]; do
|
||||
|
@ -258,4 +269,4 @@ setup_config() {
|
|||
echo -e "${YELLOW}You can change the configuration later by running the script with the --config option.${RESET}"
|
||||
|
||||
[[ "$show_capture_preview" == "true" ]] && setup_venv
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ declare -A ALLOWED_KEYS=(
|
|||
["log_level"]="^(DEBUG|INFO|WARN|ERROR)$"
|
||||
["SHOW_CAPTURE_PREVIEW"]="^(true|false)$"
|
||||
["SHOW_NOTIFICATIONS"]="^(true|false)$"
|
||||
["SNIP_SOUND"]="^(true|false)$"
|
||||
["SAVE_IMAGES"]="^(true|false)$"
|
||||
["SAVE_DIR"]="^.+$"
|
||||
["DOMAIN"]="^.+$"
|
||||
|
@ -29,6 +30,7 @@ declare -A ALLOWED_KEYS=(
|
|||
REQUIRED_KEYS=(
|
||||
"SHOW_CAPTURE_PREVIEW"
|
||||
"SHOW_NOTIFICATIONS"
|
||||
"SNIP_SOUND"
|
||||
"SAVE_IMAGES"
|
||||
"DEFAULT_OPTION"
|
||||
)
|
||||
|
@ -65,4 +67,4 @@ declare -A UPLOAD_JSON_KEYS=(
|
|||
["ez"]="imageUrl"
|
||||
["fakecrime"]="url"
|
||||
["zipline"]="files[0].url"
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue