mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-02-07 12:19:02 +00:00
Revise screenshot capture script
This commit is contained in:
parent
8fe1feafd4
commit
356addaf68
@ -72,19 +72,20 @@ else
|
|||||||
pic_filepath="$pic_directory/$date_format.png"
|
pic_filepath="$pic_directory/$date_format.png"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$pic_filepath"
|
|
||||||
maim_command="maim $pic_filepath "
|
maim_command="maim $pic_filepath "
|
||||||
|
|
||||||
if [[ $SELECT -eq 1 ]]; then
|
if [[ $SELECT -eq 1 ]]; then
|
||||||
geometry_coordinates=$(slop)
|
notify-send "Screenshot capture selection mode" "Select a region to capture the screenshot." --expire-time=1000
|
||||||
|
|
||||||
if [[ -z $geometry_coordinates ]]; then
|
geometry_coordinates=$(slop)
|
||||||
|
if [[ $? != 0 ]]; then
|
||||||
|
notify-send "Screenshot capture cancelled" "Selection mode has been exited."
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
maim_command+="--geometry=$geometry_coordinates "
|
maim_command+="--geometry=$geometry_coordinates "
|
||||||
|
|
||||||
if [[ -n $OUTPUT ]]; then
|
if [[ -n "$OUTPUT" ]]; then
|
||||||
pic_filepath="$pic_directory/$date_format-$geometry_coordinates.png"
|
pic_filepath="$pic_directory/$date_format-$geometry_coordinates.png"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -95,5 +96,4 @@ if [[ $DELAY -gt 0 ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
maim_process=$($maim_command)
|
maim_process=$($maim_command)
|
||||||
|
|
||||||
notify-send "Screenshot taken" "It is saved at $pic_filepath."
|
notify-send "Screenshot taken" "It is saved at $pic_filepath."
|
||||||
|
Loading…
Reference in New Issue
Block a user