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

Turning off the Flameshot warning #3186

Open
raidenovich opened this issue May 3, 2023 · 13 comments · May be fixed by #3456
Open

Turning off the Flameshot warning #3186

raidenovich opened this issue May 3, 2023 · 13 comments · May be fixed by #3456
Labels
Enhancement Feature requests and code enhancements Good first issue Issues labeled as such are a good way to get use to the codebase. Ask for help if needed.

Comments

@raidenovich
Copy link

Flameshot Version

Flameshot v12.1.0 (3ededae)
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

@raidenovich raidenovich added the Unconfirmed Bug The bug is not confirmed by anyone else. label May 3, 2023
@mmahmoudian
Copy link
Member

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 mmahmoudian added the Waiting For Info Addressing the issue or merging the PR is halted and we are waiting for more info to be provided. label May 4, 2023
@raidenovich
Copy link
Author

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

@raidenovich
Copy link
Author

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..

@raidenovich
Copy link
Author

raidenovich commented May 7, 2023

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

@mmahmoudian
Copy link
Member

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

@raidenovich
Copy link
Author

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?

@mmahmoudian mmahmoudian added Enhancement Feature requests and code enhancements Good first issue Issues labeled as such are a good way to get use to the codebase. Ask for help if needed. and removed Waiting For Info Addressing the issue or merging the PR is halted and we are waiting for more info to be provided. Unconfirmed Bug The bug is not confirmed by anyone else. labels May 11, 2023
@d3cryptofc
Copy link

d3cryptofc commented Aug 12, 2023

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

@mmahmoudian
Copy link
Member

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

@raidenovich
Copy link
Author

raidenovich commented Nov 20, 2023

@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...

@Rolv-Apneseth
Copy link

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 = ""

@resetko
Copy link

resetko commented Dec 13, 2023

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

Monirzadeh added a commit to Monirzadeh/flameshot that referenced this issue Dec 30, 2023
@Monirzadeh Monirzadeh linked a pull request Dec 30, 2023 that will close this issue
@JoshElias
Copy link

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.

@cbaconnier
Copy link

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_GRIM=ON \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-Wno-dev

cmake --build build

cmake --install build

cd /tmp

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Feature requests and code enhancements Good first issue Issues labeled as such are a good way to get use to the codebase. Ask for help if needed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants