1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-10-10 03:21:16 +02:00

scripts: updated to cleaner logic for global variables

This commit is contained in:
2025-02-17 04:19:49 +01:00
parent 7322a068c2
commit c7e33b6162
7 changed files with 17 additions and 20 deletions

View File

@@ -3,9 +3,9 @@
# Requires maim. It lets you choose the kind of screenshot to take,
# including copying the image or even highlighting an area to copy.
[ -z "$SCREENSHOT_DIR" ] && output_dir="$HOME/downloads" || output_dir="$SCREENSHOT_DIR"
output=${SCREENSHOT_DIR:-$HOME/downloads}
output="$output_dir/screenshot-$(date '+%Y-%m-%d_%H-%M-%S').png"
output="$output/screenshot-$(date '+%Y-%m-%d_%H-%M-%S').png"
xclip_img="xclip -sel clip -t image/png"
xclip_txt="xclip -sel clip -t text/plain"