~magic_rb/dotfiles

eacd15086ccdcd16d91e0dccd8e04cd9b40bd499 — Magic_RB 8 months ago 9daa0eb
Minor reformat of screenshot utility

Signed-off-by: Magic_RB <magic_rb@redalder.org>
1 files changed, 10 insertions(+), 11 deletions(-)

M overlays/screenshot/screenshot
M overlays/screenshot/screenshot => overlays/screenshot/screenshot +10 -11
@@ 1,21 1,20 @@
# -*- mode: shell-script; -*-
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
#
# SPDX-License-Identifier: LGPL-3.0-or-later

# -*- mode: shell-script; -*-

export PATH=@scrot@/bin:@xclip@/bin:@busybox@/bin

OPT="${1:-screen}"

case "$OPT" in
	screen)
		scrot '/tmp/%F_%T_$wx$h.png' -e 'mkdir -p ~/screenshot/ ; mv $f ~/screenshot ; xclip -selection clipboard -target image/png -i ~/screenshot/`basename $f`'
		;;
	select)
		scrot '/tmp/%F_%T_$wx$h.png' -f -s -e 'mkdir -p ~/screenshot/ ; mv $f ~/screenshot ; xclip -selection clipboard -target image/png -i ~/screenshot/`basename $f`'
		;;
	focused)
		scrot '/tmp/%F_%T_$wx$h.png' -f -e 'mkdir -p ~/screenshot/ ; mv $f ~/screenshot ; xclip -selection clipboard -target image/png -i ~/screenshot/`basename $f`'
		;;
        screen)
                scrot '/tmp/%F_%T_$wx$h.png' -e 'mkdir -p ~/screenshot/ ; mv $f ~/screenshot ; xclip -selection clipboard -target image/png -i ~/screenshot/`basename $f`'
                ;;
        select)
                scrot '/tmp/%F_%T_$wx$h.png' -f -s -e 'mkdir -p ~/screenshot/ ; mv $f ~/screenshot ; xclip -selection clipboard -target image/png -i ~/screenshot/`basename $f`'
                ;;
        focused)
                scrot '/tmp/%F_%T_$wx$h.png' -f -e 'mkdir -p ~/screenshot/ ; mv $f ~/screenshot ; xclip -selection clipboard -target image/png -i ~/screenshot/`basename $f`'
                ;;
esac