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

Feature Request: Option to take a Screenshot & save it in the background like in Windows (win + prt scr) #364

Open
ghost opened this issue Apr 17, 2024 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 17, 2024

Expected Behavior

When I press the shortcut (let say prt scr), it should take a screenshot of the whole screen & save it, even if we don't have ScreenGrab opened (I think it has to be open as a background process for the shortcut to work, but I'm not experienced in Software Development).

While doing this, NO notification should be generated either (or there can be an option to toggle notification on/off).

Current Behavior

Currently, we have to open ScreenGrab & enable "Autosave screenshot" & "Save first screenshot". After that whenever we press crtl+N, a screenshot gets saved. But for this to succeed, we need to be on the ScreenGrab window itself, we can't do this while being on some other window.

Possible Solution

Again, no software dev here. I'm using a make shift solution by using the following bash file named screenshot,

#!/usr/bin/bash
screengrab -f -m &
pid=$(echo $!)
sleep 2
kill -SIGTERM $pid

After that I made it into an executable & assigned ./screenshot to my prt scr button.

If you're using my method, please put my name (Sourav Mahato) in the credits too. You know, just for the bragging rights. XD

Steps to Reproduce (for bugs)

N/A

Context

While playing Video Games, I can't open ScreenGrab to take screenshot. Also, just pressing prt scr is a lot faster too than opening an app, pressing a shortcut & then closing it.

System Information
  • Distribution & Version: Debian 12 (bookworm) x86_64
  • Kernel: 6.1.0-20-amd64
  • Qt Version: 5.15.8
  • libqtxdg Version: Dunno, just put the command how to check it (LXQt version: 1.2.0)
  • lxqt-build-tools Version: Dunno, just put the command how to check it (LXQt version: 1.2.0)
  • Package version: screengrab 2.5.0
@zeugmatis
Copy link

I'd like to second this. Trying to get away from GNOME which has equivalent behavior - you can specify a filename at CLI to save and silently exit. So I had a shortcut like this:

sh -c 'gnome-screenshot -f /home/$USER/Pictures/Screenshot_from($date"+%Y-%m-%d_%H-%M-%S").jpg'

...would nice to have equivalent or at least maybe a switch -q / --quit to silently exit after saving so it doesn't show the window every time.

The shellscript OP did doesn't work for screengrab -r to get a selectable region (which would also like to bind to a shortcut). screengrab --region --quit to exit after saving (no window popup) would be perfect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant