We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
grimblast
@fufexan @Misterio77
Bug
The screenshot is copied/saved properly, but an error appears. This only happens when my cursor is on my second monitor when taking a screenshot.
grimblast --notify copy area, and either take a screenshot only on a secondary display, or from the first to the second one.
grimblast --notify copy area
This happens with area, active, and output.
area
active
output
takeScreenshot() { FILE=$1 GEOM=$2 OUTPUT=$3 if [ -n "$OUTPUT" ]; then moveCursorPosition && grim ${CURSOR:+-c} ${SCALE:+-s "$SCALE"} -o "$OUTPUT" "$FILE" && restoreCursorPosition || die "Unable to invoke grim" elif [ -z "$GEOM" ]; then grim ${CURSOR:+-c} ${SCALE:+-s "$SCALE"} "$FILE" || die "Unable to invoke grim" else moveCursorPosition && grim ${CURSOR:+-c} ${SCALE:+-s "$SCALE"} -g "$GEOM" "$FILE" && restoreCursorPosition || die "Unable to invoke grim" fi }
This seems, to my uneducated eyes, like the good old "A && B || C is not if-then-else. C may run when A is true." if statements may just save our day:
if
takeScreenshot() { FILE=$1 GEOM=$2 OUTPUT=$3 if [ -n "$OUTPUT" ]; then moveCursorPosition if grim ${CURSOR:+-c} ${SCALE:+-s "$SCALE"} -o "$OUTPUT" "$FILE"; then restoreCursorPosition else die "Unable to invoke grim" fi elif [ -z "$GEOM" ]; then grim ${CURSOR:+-c} ${SCALE:+-s "$SCALE"} "$FILE" || die "Unable to invoke grim" else moveCursorPosition if grim ${CURSOR:+-c} ${SCALE:+-s "$SCALE"} -g "$GEOM" "$FILE"; then restoreCursorPosition else die "Unable to invoke grim" fi fi }
I am an absolute noob when it comes to shell scripting, so feel free to roast and improve upon this, as long as the error is withered away.
No response
The text was updated successfully, but these errors were encountered:
I cannot reproduce this with your instructions.
Sorry, something went wrong.
https://www.youtube.com/watch?v=4I6-rSbFppM Excuse the poor quality, my phone is very ass.
No branches or pull requests
Program
grimblast
Maintainers of the program
@fufexan @Misterio77
Bug or Regression?
Bug
Description
The screenshot is copied/saved properly, but an error appears.
This only happens when my cursor is on my second monitor when taking a screenshot.
How to reproduce
Command to reproduce
grimblast --notify copy area
, and either take a screenshot only on a secondary display, or from the first to the second one.This happens with
area
,active
, andoutput
.Relevant part of the script:
(A) Possible solution:
This seems, to my uneducated eyes, like the good old "A && B || C is not if-then-else. C may run when A is true."
if
statements may just save our day:I am an absolute noob when it comes to shell scripting, so feel free to roast and improve upon this, as long as the error is withered away.
Hyprland crash reports, program logs, images, videos
No response
The text was updated successfully, but these errors were encountered: