flameshot icon indicating copy to clipboard operation
flameshot copied to clipboard

Turning off the Flameshot warning

Open ardishko opened this issue 2 years ago • 13 comments

Flameshot Version

Flameshot v12.1.0 (3ededae5) Compiled with Qt 5.15.9

Installation Type

Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...)

Operating System type and version

6.2.13-arch1-1

Description

I would like a feature where you can turn off the warning, It looks ugly on my screenshots.

Steps to reproduce

  1. run flameshot gui
  2. warning shows up
  3. says "flameshot: warning: grim's screenshot component is implemented based on wlroots, it may not be used in GNOME or similar desktop environments" on dunst.

Screenshots or screen recordings

https://cdn.discordapp.com/attachments/614906750612668428/1103450673401573396/TYzywxt.png

System Information

Arch Linux 6.2.13-arch1-1 Dual Monitors, 2K 144hz/1080p 60hz SwayWM, Wayland

ardishko avatar May 03 '23 22:05 ardishko

Thanks for creating the issue. Two points:

  1. Is it a bug report or feature request? You filled a bug report form but wrote "I would like a feature where".
  2. Please post your screenshots and recordings directly to Github. For security reasons we do not open files on thridparty websites.

mmahmoudian avatar May 04 '23 02:05 mmahmoudian

This is a feature request, I know there's a flair for enhancements but I couldn't find it unfortunately.

About the screenshot, my bad. here's an imgur link so you don't have to download anything https://imgur.com/hNCfTCq

ardishko avatar May 04 '23 11:05 ardishko

the photo itself: image

the warning isn't an eyesore, but sort of defeats the purpose of a screenshot tool since it's taking up a small amount of space..

ardishko avatar May 06 '23 16:05 ardishko

Also, I would like to add that reporting this as a bug was a mistake, I misclicked. Should have clicked "Feature request" instead

ardishko avatar May 07 '23 18:05 ardishko

If you mean that thing in the top right of the screen, then it is called "notification", and if I don't remember wrong, you can turn it off in the settings already

mmahmoudian avatar May 10 '23 06:05 mmahmoudian

Oh yep, that's a thing, but I meant more so the grim warning. It's fine in the terminal but having it appear as a notification is sometimes annoying

The "copied to clipboard notification" is quite useful and I'd like to see it, but I guess turning off the grim warning would mean recompiling?

ardishko avatar May 10 '23 12:05 ardishko

I looove flameshot, but i am loving Hyprland too. That grim warning notification shows on my print screens :(

A --disable-grim-warning flag or config looks good, please, could someone implement this feature?

NOTE: I solved temporarily this issue removing the warning code line and building again.

Clone the repo git clone https://github.com/flameshot-org/flameshot && cd flameshot

Edit file and remove warning code nano src/utils/screengrabber.cpp

Building cmake -S . -B build -D USE_WAYLAND_GRIM=1 && cmake --build build

Copying executable to your bin folder sudo cp ./build/src/flameshot /usr/local/bin

d3cryptofc avatar Aug 12 '23 15:08 d3cryptofc

@ardishco-the-great may I ask why you closed this

mmahmoudian avatar Nov 19 '23 12:11 mmahmoudian

@ardishco-the-great may I ask why you closed this

I just realised that this was already kind of a feature and thought I would close this since I thought it would be unncessary to add to the issue count..

But now looking at it again, I might have misread my own post when clearing my backlog of issues that I forgot to close so feel free to keep it open...

ardishko avatar Nov 20 '23 13:11 ardishko

I would also appreciate being able to disable the warning, as it means that I usually try to avoid capturing the whole screen to not include the notification (though sometimes I just wait for it to go away if I need the whole screen).

Just looking into it now though, for anyone using dunst, you can actually hide these notifications with this in the dunstrc:

[ignore_flameshot_warning]
    body = "grim's screenshot component is implemented based on wlroots, it may not be used in GNOME or similar desktop environments"
    format = ""

Rolv-Apneseth avatar Dec 04 '23 13:12 Rolv-Apneseth

Shouldn't stderr be a great place to have this warning instead of notifications?

resetko avatar Dec 13 '23 17:12 resetko

I hope this gets merged soon. Annoying notification to receive when you're not using GNOME. I'm getting it after compiling with the GRIM flag on Hyprland.

JoshElias avatar Jan 27 '24 15:01 JoshElias

I looove flameshot, but i am loving Hyprland too. That grim warning notification shows on my print screens :(

A --disable-grim-warning flag or config looks good, please, could someone implement this feature?

NOTE: I solved temporarily this issue removing the warning code line and building again.

Clone the repo git clone https://github.com/flameshot-org/flameshot && cd flameshot

Edit file and remove warning code nano src/utils/screengrabber.cpp

Building cmake -S . -B build -D USE_WAYLAND_GRIM=1 && cmake --build build

Copying executable to your bin folder sudo cp ./build/src/flameshot /usr/local/bin

I'm using this regex to remove the warning from the file:

    perl -0777 -i -pe 's/AbstractLogger::warning\(\)\n\s+<< tr\("grim(.|\\n)*?"\);//gs' src/utils/screengrabber.cpp

I'm not a regex expert, but currently works for me.

Here's my full script:

cd /tmp

if [ -d "flameshot" ]; then
	rm -r flameshot
fi

git clone --depth 1 https://github.com/flameshot-org/flameshot.git

cd flameshot

# remove the warning https://github.com/flameshot-org/flameshot/issues/3186
perl -0777 -i -pe 's/AbstractLogger::warning\(\)\n\s+<< tr\("grim(.|\\n)*?"\);//gs' src/utils/screengrabber.cpp

cmake -B build -S . \
	-DCMAKE_BUILD_TYPE=None \
	-DUSE_WAYLAND_CLIPBOARD=ON \
	-DUSE_WAYLAND_GRIM=ON \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-Wno-dev

cmake --build build

cmake --install build

cd /tmp

if [ -d "flameshot" ]; then
	rm -r flameshot
fi

cbaconnier avatar May 22 '24 11:05 cbaconnier

May i ask why this is not getting merged?

blackneeed avatar Jul 02 '24 07:07 blackneeed

I agree with the PR associated with this issue

jack9603301 avatar Jul 02 '24 08:07 jack9603301