flameshot
flameshot copied to clipboard
Allow "flameshot gui" with preselected area - including an active window; add command-line options
Feature Description
There are various command-line options to decide on the capture mode.
-
flameshot gui
- a manual capture in GUI mode. -
flameshot screen
- Capture a single screen. -
flameshot full
- Capture the entire desktop.
The best thing about flameshot is the GUI mode in which one can annotate the image. Plus all the upload/save/copy options.
Unfortunately, the GUI mode can't be combined with other options. I argue that it would be useful to have it.
Here is what options the Linux Mint Cinnamon provides:
- screen (as in
flameshot full
) - area (as selected with
flameshot gui
, but without annotations) - window (unfortunately, flameshot doesn't have this convenient option; no need to worry about leaking sensitive info from Desktop, taskbar, or other windows)
Since the OS doesn't allow annotating, I am using flameshot. But it means that extra work must be done: before annotating I have to manually select the full screen or a window area. Not a deal-breaker, but an inconvenience nevertheless.
Suggestion
Add the following command-line options:
-
flameshot gui --screen
- selects a single screen and goes into gui mode -
flameshot gui --full
- selects the entire desktop and goes into gui mode -
flameshot gui --window
- selects an active window and goes into gui mode
Selecting the active/focused/specific window is already suggested and is duplicate of #5 (yes it is that old and we don't have a solid approach to address this. There are ways this can be done in X11 though, as my dmenu_shot already does that with the help of xdotool
.
To select the entire desktop (all monitors), just do flameshot gui
and then like any other software out there, Ctrla to "select all". So I personally see no merit in adding an extra CLI argument for something that is already easily achievable.
The only part that it is not as easily doable is selecting the entire screen. It is still possible though scripting and at least I can think of two approaches in X11, one of which is as follows:
# required these software to be available: xrandr, dmenu
flameshot gui --region $(xrandr --query --listactivemonitors \
| grep " connected " \
| sed -E 's/( connected)|( primary)|(\(.+)|( left)//g' \
| dmenu -p "Select the monitor" \
| cut -d ' ' -f 2)
# required these software to be available: xrandr, rofi
flameshot gui --region $(xrandr --query --listactivemonitors \
| grep " connected " \
| sed -E 's/( connected)|( primary)|(\(.+)|( left)//g' \
| rofi -dmenu -p "Select the monitor" \
| cut -d ' ' -f 2)
I will leave this issue open because of this one-third to get comments from other devs.
I agree that the only thing really missing is the selecting entire screen. What if the first time you press Ctrl + A it selects the entire screen with the active widget, and the second time you press it it grabs all monitors?
the first time you press Ctrl + A it selects the entire screen with the active widget, and the second time you press it it grabs all monitors
Although it is a breaking change, I don't think we get so much backlash. If we ultimately go with this, can the third time press selects the monitor again? Basically all odd times it selects monitor and all even times it selects all monitors. Although either the implementation should not be based on even/odd count, or the counter should reset to zero if the size/position of the selected region is reset.
Although it is a breaking change, I don't think we get so much backlash
I agree.
My further suggestion would be to have 3 switch modes instead of 2. So in addition to:
- select monitor
- select screen also switch to
- select the area that was chosen before pressing Ctrl+A for the first time. If none was selected, then it should display the unselected view.
Ctrl+A would be a hotkey toggling between 3 selections: 1->2->3->1
That would make pressing the hotkey and screwing the area selection reversible. Currently, there is no way to do it. Ctrl+Z does nothing and Esc simply exists the application and forces to lose all the progress.
Additional question
Perhaps the Ctrl+Z undo should also work for area selection?
- select the area that was chosen before pressing Ctrl+A for the first time. If none was selected, then it should display the unselected view.
I personally think this is too unintuitive. Having Ctrl-z makes way more sense in my head than Ctrl-a because:
- Ctrl-a means "select all" which can be interpreted as "all monitors" or "all of the active monitor", so "go back to previous choice" sounds odd to me
- Ctrl-z can also be used or accidental deselect of the region
I agree; However, Ctrl-Z is already taken, for undoing markups like adding arrows or lines. I think it would make much more sense to make a specific hotkey just for undoing selection changes.
Ctrl-Z is already taken, for undoing markups like adding arrows or lines.
It is bound to "undo". At the moment the chances in the region selection are not pushed to the undo stack, but can be. Ctrl-z is very intuitive for this