Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sparky-screenshot #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions bin/sparky-screenshot
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@
# Created by Paweł "pavroo" Pijanowski 2013/06/30
# Copyright 2013-2024 under the GNU GPL2 License
# Last update 2024/07/29 by pavroo
# Last update 2024/11/18 by Fernando Souza - https://www.youtube.com/@fernandosuporte

which yad || exit
which scrot || exit


# programa="gthumb"
programa="gpicview"

which "$programa" || exit


# get default's locale file
DEFLOCDIR="/usr/share/sparky/sparky-screenshot"
Expand Down Expand Up @@ -45,7 +56,7 @@ else
. $DEFLOCDIR/en
fi

DIALOG="yad --window-icon=applets-screenshooter --width=500 --height=300 --center"
DIALOG="yad --center --window-icon=applets-screenshooter --width=500 --height=300 --center"
TITLE="--always-print-result --dialog-sep --image=applets-screenshooter --title="
TEXT="--text="
MENU="--list --column=$LOCAL1 --column=$LOCAL2"
Expand Down Expand Up @@ -76,19 +87,19 @@ fi
}

screenshot0menu () {
scrot 'screenshot_%Y-%m-%d-%s_$wx$h.png' -e 'mv $f ~/ & gpicview ~/$f'
scrot 'screenshot_%Y-%m-%d-%s_$wx$h.png' -e 'mv $f ~/ & "$programa" ~/$f'

mainmenu
}

screenshot10menu () {
scrot -d 10 'screenshot_%Y-%m-%d-%s_$wx$h.png' -e 'mv $f ~/ & gpicview ~/$f'
scrot -d 10 'screenshot_%Y-%m-%d-%s_$wx$h.png' -e 'mv $f ~/ & "$programa" ~/$f'

mainmenu
}

screenshotSmenu () {
scrot -s 'screenshot_%Y-%m-%d-%s_$wx$h.png' -e 'mv $f ~/ & gpicview ~/$f'
scrot -s 'screenshot_%Y-%m-%d-%s_$wx$h.png' -e 'mv $f ~/ & "$programa" ~/$f'

mainmenu
}
Expand Down