init upload
test-clang-format / build (push) Canceled after 0s

This commit is contained in:
wullie committed 2026-11-08 14:03:29 +00:00
commit a7c3157345
496 files changed
+171644

No files matched your search

View File
Whitespace-only changes.
+47
View File
@@ -0,0 +1,47 @@
# Contributing
Contributions are welcome! Here's how you can help:
- [Translating](#translations)
- [Contributing code](#code)
- [Reporting issues](#issues)
- [Donating](#donations)
## Translations
See [translation instructions](https://github.com/flameshot-org/translation-instruction).
## Code
For small fixes or incremental improvements simply fork the repo and follow the process below. For larger changes submit an [RFC:](RFC.md)
1. [Fork](https://help.github.com/articles/fork-a-repo/) the repository and [clone](https://help.github.com/articles/cloning-a-repository/) your fork.
2. Start coding!
- Implement your feature.
- Check your code works as expected.
- Run the code formatter: `clang-format -i $(git ls-files "*.cpp" "*.h")`
3. Commit your changes to a new branch (not `master`, one change per branch) and push it:
- Commit messages should:
- Header line: explain the commit in one line (use the imperative)
- Be descriptive.
- Have a first line with less than *80 characters* and have a second line that is *empty* if you want to add a description.
4. Once you are happy with your changes, submit a pull request.
- Open the pull-request.
- Add a short description explaining briefly what you've done (or if it's a work-in-progress - what you need to do)
## Issues
1. Do a quick search on GitHub to check if the issue has already been reported.
2. [Open an issue](https://github.com/flameshot-org/flameshot/issues/new) and describe the issue you are having - you could include:
- Screenshots
- Ways to reproduce the issue.
- Your Flameshot version.
- Your platform (e.g. Windows 10 or Ubuntu 15.04 x64)
After reporting you should aim to answer questions or clarifications as this helps pinpoint the cause of the issue.
## Donations
The best way to fund Flameshot is to create a bounty here: https://rysolv.com/issues
+233
View File
@@ -0,0 +1,233 @@
# Flameshot RFCs
[Flameshot RFCs]: #flameshot-rfcs
Many changes, including bug fixes and documentation improvements can be
implemented and reviewed via the normal GitHub pull request workflow.
Some changes though are "substantial", and we ask that these be put through a
bit of a design process and produce a consensus among the Flameshot community and development team.
The "RFC" (request for comments) process is intended to provide a consistent
and controlled path for new features to enter the language and standard
libraries, so that all stakeholders can be confident about the direction the
project is evolving in.
## Table of Contents
[Table of Contents]: #table-of-contents
+ [Opening](#flameshot-rfcs)
+ [Table of Contents]
+ [When you need to follow this process]
+ [Before creating an RFC]
+ [What the process is]
+ [The RFC life-cycle]
+ [Reviewing RFCs]
+ [Implementing an RFC]
+ [RFC Postponement]
+ [Help this is all too informal!]
## When you need to follow this process
[When you need to follow this process]: #when-you-need-to-follow-this-process
You need to follow this process if you intend to make "substantial" changes to
Flameshot or the RFC process itself. What constitutes a
"substantial" change is evolving based on community norms and varies depending
on what part of the ecosystem you are proposing to change, but may include the
following.
+ Any changes breaking compatibility to command line flags or config files.
+ Any major changes to the UI
+ Substantial new features like new tools.
Some changes do not require an RFC:
+ Rephrasing, reorganizing, refactoring, or otherwise "changing shape does
not change meaning".
+ Improving translations.
+ Additions that strictly improve objective, numerical quality criteria
(warning removal, speedup, better platform coverage, etc.)
+ Additions only likely to be _noticed by_ other developers-of-flameshot,
invisible to users-of-flameshot.
If you submit a pull request to implement a new feature without going through
the RFC process, it may be closed with a polite request to submit an RFC first.
## Before creating an RFC
[Before creating an RFC]: #before-creating-an-rfc
A hastily-proposed RFC can hurt its chances of acceptance. Low quality
proposals, proposals for previously-rejected features, or those that don't fit
into the near-term roadmap, may be quickly rejected, which can be demotivating
for the unprepared contributor. Laying some groundwork ahead of the RFC can
make the process smoother.
Although there is no single way to prepare for submitting an RFC, it is
generally a good idea to pursue feedback from other project developers
beforehand, to ascertain that the RFC may be desirable; having a consistent
impact on the project requires concerted effort toward consensus-building.
The most common preparations for writing and submitting an RFC include talking
the idea over on our [official Matrix Space](https://matrix.to/#/#flameshot-org:matrix.org) in the [Developers](https://matrix.to/#/!AYbNXDGTDwApLwzkNg:feneas.org?via=kde.org&via=matrix.org&via=ryan77627.xyz), or opening an issue on [Github Discussions](https://github.com/flameshot-org/flameshot/discussions).
## What the process is
[What the process is]: #what-the-process-is
In short, to get a major feature added to Flameshot, one must first get the RFC
merged into the RFC repository as a markdown file. At that point the RFC is
"active" and may be implemented with the goal of eventual inclusion into Flameshot.
+ Fork the Flameshot repo
+ Copy `docs/0000-template.md` to `docs/RFC/0000-my-feature.md` (where "my-feature" is
descriptive). Don't assign an RFC number yet; This is going to be the PR
number and we'll rename the file accordingly if the RFC is accepted.
+ Fill in the RFC. Put care into the details: RFCs that do not present
convincing motivation, demonstrate lack of understanding of the design's
impact, or are disingenuous about the drawbacks or alternatives tend to
be poorly-received.
+ Submit a pull request. As a pull request the RFC will receive design
feedback from the larger community, and the author should be prepared to
revise it in response.
+ Build consensus and integrate feedback. RFCs that have broad support are
much more likely to make progress than those that don't receive any
comments. Feel free to reach out to the RFC assignee in particular to get
help identifying stakeholders and obstacles.
+ The team will discuss the RFC pull request, as much as possible in the
comment thread of the pull request itself. Offline discussion will be
summarized on the pull request comment thread.
+ RFCs rarely go through this process unchanged, especially as alternatives
and drawbacks are shown. You can make edits, big and small, to the RFC to
clarify or change the design, but make changes as new commits to the pull
request, and leave a comment on the pull request explaining your changes.
Specifically, do not squash or rebase commits after they are visible on the
pull request.
+ At some point, a member of the development team will propose a "motion for final
comment period" (FCP), along with a *disposition* for the RFC (merge, close,
or postpone).
- This step is taken when enough of the tradeoffs have been discussed that
the development is in a position to make a decision. That does not require
consensus amongst all participants in the RFC thread (which is usually
impossible). However, the argument supporting the disposition on the RFC
needs to have already been clearly articulated, and there should not be a
strong consensus *against* that position outside of the development team. Team
members use their best judgment in taking this step, and the FCP itself
ensures there is ample time and notification for stakeholders to push back
if it is made prematurely.
+ In most cases, the FCP period is quiet, and the RFC is either merged or
closed. However, sometimes substantial new arguments or ideas are raised,
the FCP is canceled, and the RFC goes back into development mode.
## The RFC life-cycle
[The RFC life-cycle]: #the-rfc-life-cycle
Once an RFC becomes "active" then authors may implement it and submit the
feature as a pull request to the Flameshot repo. Being "active" is not a rubber
stamp, and in particular still does not mean the feature will ultimately be
merged; it does mean that in principle all the major stakeholders have agreed
to the feature and are amenable to merging it.
Furthermore, the fact that a given RFC has been accepted and is "active"
implies nothing about what priority is assigned to its implementation, nor does
it imply anything about whether a developer has been assigned the task of
implementing the feature. While it is not *necessary* that the author of the
RFC also write the implementation, it is by far the most effective way to see
an RFC through to completion: authors should not expect that other project
developers will take on responsibility for implementing their accepted feature.
Modifications to "active" RFCs can be done in follow-up pull requests. We
strive to write each RFC in a manner that it will reflect the final design of
the feature; but the nature of the process means that we cannot expect every
merged RFC to actually reflect what the end result will be at the time of the
next major release.
In general, once accepted, RFCs should not be substantially changed. Only very
minor changes should be submitted as amendments. More substantial changes
should be new RFCs, with a note added to the original RFC. Exactly what counts
as a "very minor change" is up to the development team.
## Reviewing RFCs
[Reviewing RFCs]: #reviewing-rfcs
The preferred method of discussing RFC's is the Github issue. However, the development team may schedule meetings with the
author and/or relevant stakeholders to discuss the issues in greater detail. In either
case a summary from the meeting will be posted back to the RFC pull request.
The development team makes final decisions about RFCs after the benefits and drawbacks
are well understood. These decisions can be made at any time, but the sub-team
will regularly issue decisions. When a decision is made, the RFC pull request
will either be merged or closed. In either case, if the reasoning is not clear
from the discussion in thread, the sub-team will add a comment describing the
rationale for the decision.
## Implementing an RFC
[Implementing an RFC]: #implementing-an-rfc
Some accepted RFCs represent vital features that need to be implemented right
away. Other accepted RFCs can represent features that can wait until some
arbitrary developer feels like doing the work. Every accepted RFC has an
associated issue tracking its implementation in the Flameshot repository; thus that
associated issue can be assigned a priority via the triage process that the
team uses for all issues in the Flameshot repository.
The author of an RFC is not obligated to implement it. Of course, the RFC
author (like any other developer) is welcome to post an implementation for
review after the RFC has been accepted.
If you are interested in working on the implementation for an "active" RFC, but
cannot determine if someone else is already working on it, feel free to ask
(e.g. by leaving a comment on the associated issue).
## RFC Postponement
[RFC Postponement]: #rfc-postponement
Some RFC pull requests are tagged with the "postponed" label when they are
closed (as part of the rejection process). An RFC closed with "postponed" is
marked as such because we want neither to think about evaluating the proposal
nor about implementing the described feature until some time in the future, and
we believe that we can afford to wait until then to do so.
Usually an RFC pull request marked as "postponed" has already passed an
informal first round of evaluation, namely the round of "do we think we would
ever possibly consider making this change, as outlined in the RFC pull request,
or some semi-obvious variation of it." (When the answer to the latter question
is "no", then the appropriate response is to close the RFC, not postpone it.)
### Help this is all too informal!
[Help this is all too informal!]: #help-this-is-all-too-informal
The process is intended to be as lightweight as reasonable for the present
circumstances. As usual, we are trying to let the process be driven by
consensus and community norms, not impose more structure than necessary.
+144
View File
@@ -0,0 +1,144 @@
# Add an opacity slider to the Tool Settings
### To be Reviewed By
* borgmanJeremy
* mmahmoudian
* Flameshot developers
<br>
### Authors
* Pr. Sunflower
<br>
### Status: Draft ~~| Discussion | Active | Dropped | Superseded~~
[Pr. Sunflower] This is the first time the authors are redacting a document of this sort and they kindly request to double-check their writings and to assist them in missing parts.
<br>
### Superseded by
N/A
<br>
### Related
* Issue #249
* Issue #1085
<br>
## Problem
Currently the drawing and marking tools in Flameshot only have one, non-customisable opacity setting. This current setting is bad for highlighting text because the Marker tool looks very pale. To compensate the user often has to highlight multiple times which is not convenient and time-consuming.
Here is a comparison of Flameshot's Marker tool with Microsoft's **Snip & Sketch** Highlighter tool:
### Black text on light background
**Flameshot:**
![Flameshot_WHITE](https://user-images.githubusercontent.com/59576952/96623357-8c0a8600-130b-11eb-82e9-05ebbd95a7d9.png)
**Snip & Sketch:**
![Snip_and_Sketch_WHITE](https://user-images.githubusercontent.com/59576952/96623397-9a58a200-130b-11eb-9d27-9a85f4fad504.png)
<br>
### White text on dark background
**Flameshot:**
![Flameshot_BLACK](https://user-images.githubusercontent.com/59576952/96623470-b8260700-130b-11eb-88ff-ff34ea69294c.png)
**Snip & Sketch:**
![Snip_and_Sketch_BLACK](https://user-images.githubusercontent.com/59576952/96623478-bbb98e00-130b-11eb-9e26-59f72cc936a4.png)
<br>
<br>
## Anti-Goals
Flameshot's Marker tool does a very good job at keeping the text readable so this is not linked to this request.
![image](https://user-images.githubusercontent.com/59576952/96624043-806b8f00-130c-11eb-9eb3-ce01d19234df.png)
![image](https://user-images.githubusercontent.com/59576952/96624227-bf99e000-130c-11eb-92e7-d9c6087f110c.png)
<br>
<br>
## Solution
**Add a way to control opacity, like an opacity slider in the Tool Settings.**
Add an opacity slider under "Active thickness".
![Screenshot from 2021-04-25 17-22-06](https://user-images.githubusercontent.com/59576952/115998533-ba3d8b00-a5f8-11eb-8464-da15b42ce9b1.png)
<br>
<br>
## Performance Impact
[Pr. Sunflower:] *I need help for this part.*
Do you anticipate the proposed changes to impact performance in any way? Are there plans to measure and/or mitigate the impact?
<br>
## Backwards Compatibility and Upgrade Path
[Pr. Sunflower:] *I need help for this part.*
Will the regular rolling upgrade process work with these changes?
How do the proposed changes impact backwards-compatibility? Are message or file formats changing?
Is there a need for a deprecation process to provide an upgrade path to users who will need to adjust their applications?
<br>
## Prior Art
[Pr. Sunflower:] *I don't think this part is useful.*
What would be the alternatives to the proposed solution? What would happen if we don’t solve the problem? Why should this proposal be preferred?
<br>
## FAQ
[Pr. Sunflower:] *I need help for this part.*
Answers to questions you’ve commonly been asked after requesting comments for this proposal.
<br>
## Errata
[Pr. Sunflower:] *I need help for this part.*
What are minor adjustments that had to be made to the proposal since it was approved?
+19
View File
@@ -0,0 +1,19 @@
## V12.1.0
This is a minor release that fixed some bugs introduced in the v12 release.
## What's Changed
* Fix typos by @luzpaz in https://github.com/flameshot-org/flameshot/pull/2705
* rename Imgur API Key to Imgur Application Client ID by @thehunmonkgroup in https://github.com/flameshot-org/flameshot/pull/2719
* fix issue about externalWidget launchapp by @Alaskra in https://github.com/flameshot-org/flameshot/pull/2698
* Fix size not appearing on size tool when started from launcher by @borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2734
* Added option to pin menu to close pin by @borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2736
* disable option to launch on start by default by @borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2735
* Fix magnify windows by @borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2746
* DesktopFileParser only reads .desktop files @wd5gnr https://github.com/flameshot-org/flameshot/pull/2742
## New Contributors
* @cliffcoffee made their first contribution in https://github.com/flameshot-org/flameshot/pull/2726
* @thehunmonkgroup made their first contribution in https://github.com/flameshot-org/flameshot/pull/2719
* @wd5gnr made their first contribution in https://github.com/flameshot-org/flameshot/pull/2742
**Full Changelog**: https://github.com/flameshot-org/flameshot/compare/v12.0.0...v12.1.0
+63
View File
@@ -0,0 +1,63 @@
# 0.8 Release Notes
Thanks to all the testers and contributors that helped make version 0.8! We are very excited to have improved many bugs and added new features in version 0.8.
## Known Issues
* Wayland support is experimental. In generic packages (Snap, Flatpak, AppImage) there may be extra issues with Wayland.
* In generic packages(Snap, Flatpak, AppImage) due to confinement "Open With External Application" does not work.
* If "close after capture" is enabled, and a user copies the image to clipboard, the image may not actually be in the clipboard. We recommend using the "Save" feature with close after capture.
## New Features
* Fix capture after pressing ctrl + S during textarea input (#311)
* Add translation:
- Japanese (#361)
- Brazilian Portuguese (#364)
- Serbian (#376)
- Dutch (#440)
- Ukrainian (#464)
- German (#467)
- Slovak (#525)
- Basque
- Czech
- Swedish
- Italian
- Korean
- Dutch
* Allow enter key to copy image to clipboard (#362)
* side panel: Add thickness slider (#374)
* Add support for saving as JPG and BMP files. (#436)
* Allow 45 degree adjustment for some tools (#439)
* Add option to close after capture (WARNING: this function is buggy! It may not work well if you are going to copy the image to clipboard! If you encounter problems related to clipboard, please disable this feature in the configuration and try again. This is a known bug, see #557 and #569 .)
* Add a basic launcher panel.
* Add option to auto copy URL after upload (#553)
* Add a circle counter tool.
* Replace the blur tool with pixelate tool.
* Convert buildsystem from QMake to CMake.
* Add launcher action into .desktop file.
* Added Generic Packages (Snap, Flatpak, AppImage)
* Improved Windows support
## Preview of New Features
### Pixelate
The behavior of the blur tool has been modified so if the "thickness" is 0 or 1, the old blur behavior is preserved. If the thickness is increased past 1 the image will pixelate by the thickness:
![](images/pixelate.gif)
### Countertool
A popular request has been to add a tool that counts upward. This can be helpful when creating directions.
![](images/counter.gif)
### Sidebar
A button has been added to open the sidebar. This tool was previously only accessible by hitting "Spacebar" which made usage on tablets difficult. This sidebar allows advanced modifications for many tools.
![](images/sidebar.gif)
## Fixes
* Exit non-zero when aborting with --raw. (#424)
* Enable Pin and Text tool by default. (#443)
* Fix the problem that moving or resizing does not affect screenshot. (#459)
* Fix problem with re-enabling disabled tray icon (#495)
* Fix compilation problem against Qt 5.15.
+40
View File
@@ -0,0 +1,40 @@
# 0.9 Release Notes
Thanks to all the testers and contributors that helped make version 0.9! We are very excited to have improved many
bugs and added new features in version 0.9.
## Known Issues
- Fractional scaling issues are not resolved. We are working with Qt upstream on this issue.
## New Features
- Improved MacOS support. MacOS is now officially supported and we will resolve any reported issues on this platform.
- Thanks to SignPath we are able to offer digitally signed windows releases.
- Improved Wayland support
- Behind the scenes we configure flameshot to automatically run on xcb. This significantly improves the
wayland experience. This resolves issues with multimonitor setups and copying to the clipboard
- New option to allow the clipboard image to be a jpeg instead of a png. This may reduce bandwidth when pasting the
image into chat or email clients
- New global shortcut menu. All actions hotkeys are fully customizable.
- Ability to take "symmetric" selections by holding down the Shift key while resizing the selection.
- The rectangle tool will now round the corners of the rectangles based on the current thickness
- All imgur uploads are now tracked in the "Upload History" menu. This makes it much easier to delete of images off imgur
or find the upload link later.
- Added "check for new release" feature. This allows users on MacOS / Windows / and AppImages to easily check for updated versions.
- New option for setting a "fixed save path". When this is enabled a user will no longer need to set the path for images
that are saved.
## Fixes
- Under certain circumstance the circle count could get set to the wrong number with large numbers of undo / redo. This
has been fixed.
- Close after capture has been removed. This feature was not well implemented and lead to numerous bugs.
+121
View File
@@ -0,0 +1,121 @@
# V11.0 Beta
This is the BETA release for version 11. As you will see below there were major refactorings to the internals of Flameshot. We did our best internal testing, but this particular beta is more likely to have issues than most.
We will be in beta for 1-2 weeks depending on what kind of issues are found and then do the official release.
## New Features
- The on-screen help menu has been clarified and dynamically updates the hotkeys based on user defined hotkeys.
<p align=center><img src="images/help_screen.png" width=50%> </p>
- DBus is no longer required for CLI options.
- Flameshot can now be run in "one off" mode which means the background systray component is now optional. See the CLI details below.
- The CLI has been completely refactored. With the new architecture we added the following:
- The man page has been rewritten to reflect all the new options. The best place to learn about these new features is the man page or flameshot --help, but some notable new features will be outlined here.
- CLI is now callable from MacOS.
- CLI options are unified wherever possible. This means if an argument is added to "flameshot gui" it is also likely to be supported in "flameshot full".
- `--region` is a new flag that allows users to specify the exact region to screenshot. It uses the same syntax as xrandr: `WxH+x+y`.
- This is likely to be added to the launcher in the next release.
- `--accept-on-select` This flag will save the image as soon as the mouse is released when selecting a region.
- The CLI now supports pinning (`--pin`), uploading (`--upload`), and copying to clipboard (`--clipboard`).
Note that in case one of these options (or `--path`, `--raw` also) is used, an *Accept* button is shown and the *Save*, *Copy*, *Upload*, *Pin*, *Open With* buttons are hidden.
- MacOS now uses monochrome icon to match the system theme better.
<p align=center><img src="images/monochrome.png" width=50%> </p>
- The sidebar now shows the hexadecimal color value when the color picker is used:
<p align=center><img src="images/hex.png" width=25%> </p>
- The about screen lists system information and allows you to copy this for easy access in bug submission forms.
- Every file format supported by your underlying system is now an option for file format when saving.
- New tool added to invert a region:
<p align=center><img src="images/invert.gif" width=75%> </p>
- Thickness of tools can now be set with the keyboard. Simply type a numerical value like "15" and you will see the indicator in the upper left.
- New zoom capability has been added to the color picker to more precisely select a color.
<p align=center><img src="images/magnify.gif" width=75%> </p>
- Text alignment can now be set in the side bar.
<p align=center><img src="images/alignment.png" width=75%> </p>
- File names can now contain '.'
- Even if a button is hidden from the toolbar, it can still be activated via hotkey.
- The uploader now gives users a confirmation box before uploading. This can be disabled. **If you disable this and accidentally upload sensitive information, there is nothing we can do. It's recommended to leave the confirmation enabled.** Also, a keyboard shortcut for upload has been enabled (`Ctrl+U` by default)
- MacOS users can now bind a custom hotkey for taking a screenshot.
- The config file parser has been reworked. It will now alert users if there is an error in their config. If a repair is possible, Flameshot attempts to repair the file.
- We do our best not to break existing configs, but sometimes adding new features or removing old ones force this to change.
- Double clicking can be used to copy the screenshot to the clipboard.
- Added an option to enable anti-aliasing when zooming in on a pinned image.
- Added completions for the fish shell
## Bug Fixes
- The border that indicates an object is moveable is no longer saved or copied with the underlying image.
- The edit buttons no longer fall in the editable region when there are strange multi monitor geometries.
- Optimizations to reduce lag on 8k and 4k screens.
- All Qt5 deprecations are fixed in preparation for Qt6.
- Many small UI improvements (ie oversized scrollbars fixed, checkboxes occluded, etc).
- Path handling has been improved.
- Fixed an issue where running Flameshot for the first time on NixOS would fail to create the config file.
- Fixed a problem with some window managers where Flameshot would lose focus and shortcuts would stop working.
## Known Issues
- Fractional scaling on linux is still not resolved. (But we have identified a workaround finally. Hope to merge soon.)
## Contributors
I want to give special shout outs to some team members that made this release possible.
- @veracioux for doing most of the refactoring that made this release possible
- @mmahmoudian for tirelessly doing triage and community management
- @Correct-Syntax for the [redesigned website](https://flameshot.org)
We are very excited by the many first time contributors that helped with this release. We are always looking for more people to contribute to Flameshot and are happy to provide mentorship if needed:
* @johnjago made their first contribution in https://github.com/flameshot-org/flameshot/pull/1779
* @veracioux made their first contribution in https://github.com/flameshot-org/flameshot/pull/1782
* @etircopyh made their first contribution in https://github.com/flameshot-org/flameshot/pull/1799
* @uncomfyhalomacro made their first contribution in https://github.com/flameshot-org/flameshot/pull/1832
* @karlhorky made their first contribution in https://github.com/flameshot-org/flameshot/pull/1845
* @Cr4ckC4t made their first contribution in https://github.com/flameshot-org/flameshot/pull/1849
* @j-tai made their first contribution in https://github.com/flameshot-org/flameshot/pull/1856
* @CrystalSage made their first contribution in https://github.com/flameshot-org/flameshot/pull/1926
* @a1346054 made their first contribution in https://github.com/flameshot-org/flameshot/pull/1918
* @PrSunflower made their first contribution in https://github.com/flameshot-org/flameshot/pull/1582
* @mgalgs made their first contribution in https://github.com/flameshot-org/flameshot/pull/1940
* @GongHeng2017 made their first contribution in https://github.com/flameshot-org/flameshot/pull/1812
* @gVirtu made their first contribution in https://github.com/flameshot-org/flameshot/pull/1981
* @YizhePKU made their first contribution in https://github.com/flameshot-org/flameshot/pull/1979
* @Lyqst made their first contribution in https://github.com/flameshot-org/flameshot/pull/1995
* @AdavisSnakes made their first contribution in https://github.com/flameshot-org/flameshot/pull/1992
* @deo002 made their first contribution in https://github.com/flameshot-org/flameshot/pull/2008
* @Michael-F-Bryan made their first contribution in https://github.com/flameshot-org/flameshot/pull/2012
* @sryze made their first contribution in https://github.com/flameshot-org/flameshot/pull/2026
* @meesha7 made their first contribution in https://github.com/flameshot-org/flameshot/pull/2042
* @majkinetor made their first contribution in https://github.com/flameshot-org/flameshot/pull/2056
* @claytron5000 made their first contribution in https://github.com/flameshot-org/flameshot/pull/2068
* @LHBosssss made their first contribution in https://github.com/flameshot-org/flameshot/pull/2098
* @ffabss made their first contribution in https://github.com/flameshot-org/flameshot/pull/2140
* @reggermont made their first contribution in https://github.com/flameshot-org/flameshot/pull/2150
* @RiedleroD made their first contribution in https://github.com/flameshot-org/flameshot/pull/2130
+90
View File
@@ -0,0 +1,90 @@
# Version 12.0.rc1 Beta
This is the beta for the version 12.0 release. We will be in beta for about a week unless major issues are discovered.
## New Features
- Created basic layer movement functionality (up, down) by @affirVega in https://github.com/flameshot-org/flameshot/pull/2108
<p align=center><img src="https://github.com/flameshot-org/flameshot/blob/master/docs/images/layer.gif" width=50%> </p>
- Added a new widget to allow the colorwheel to be more easily customized by https://github.com/flameshot-org/flameshot/pull/2202
<p align=center><img src="https://github.com/flameshot-org/flameshot/blob/master/docs/images/colorwheel.png" width=50%> </p>
- Added magnifier for more precise selections by @SilasDo in https://github.com/flameshot-org/flameshot/pull/2219
- The new magnifier can be enabled in ```Configuration > General > Show Magnifier```
- There is an option to make the magnifier a square or circle
<p align=center><img src="https://github.com/flameshot-org/flameshot/blob/master/docs/images/magnifer.gif" width=50%> </p>
- Incremental markers can now have a point if you drag when placing them. @vozdeckyl in https://github.com/flameshot-org/flameshot/pull/2638
<p align=center><img src="https://github.com/flameshot-org/flameshot/blob/master/docs/images/number_pointer.png" width=50%> </p>
- Added the ability to cache the last region by @borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2615
- The launcher tool will automatically populate the coordinates for the last selection region
- If ```Configuration > General > Use last region``` is selected, Flameshot will always initialize with the last successfully captured region
<p align=center><img src="https://github.com/flameshot-org/flameshot/blob/master/docs/images/region_launcher.png" width=50%> </p>
- Pinned screenshots can now be copied to the clipboard or saved to a file if a user right clicks on the pinned image by @zhangfuwen in https://github.com/flameshot-org/flameshot/pull/2519
- Users can now specify their own Imgur API Key from ```Configuration > General > Imgur API Key```. This is encouraged because as Flameshot has gotten more popular we have started exceeding the upload limit of the default API key by@borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2503
- Added 'Save to disk' button when uploading to imgur by @AndreaMarangoni in https://github.com/flameshot-org/flameshot/pull/2237
- Pinned screenshots can now be zoomed with a pinch gesture by @AndreaMarangoni in https://github.com/flameshot-org/flameshot/pull/2447
- The SVG's have been optimized by @RiedleroD in https://github.com/flameshot-org/flameshot/pull/2318
- Make KDE use Freedesktop portal by @greenfoo in https://github.com/flameshot-org/flameshot/pull/2495
- Allow final actions when printing geometry when invoke by CLI by @borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2444
- Many Flameshot widgets have been reworked to use .ui XML files and Qt Designer. This has been done to allow non C++ developers to more easily contribute to the graphical side of Flameshot.
<p align=center><img src="https://github.com/flameshot-org/flameshot/blob/master/docs/images/ui_file.png" width=50%> </p>
- Updated Translations
# Bug Fixes
- Pinned images can now be moved partially offscreen on linux by @zhangfuwen in https://github.com/flameshot-org/flameshot/pull/2520
- Wayland builds now use KF Gui (KDE Framework tools) to fix some issues by @borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2305
- Fix Flameshot crashes with GB locale by @AndreaMarangoni in https://github.com/flameshot-org/flameshot/pull/2304
- Add alternative shortcuts file for KDE Flatpak installs by @Proton-459 in https://github.com/flameshot-org/flameshot/pull/2357
- fixed freeze with copy URL to clipboard by @borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2348
- Fixed crash selecting texttool by @AndreaMarangoni in https://github.com/flameshot-org/flameshot/pull/2369
- Improve tooltips texts by @mmahmoudian in https://github.com/flameshot-org/flameshot/pull/2377
- better zsh code completion by @mmahmoudian in https://github.com/flameshot-org/flameshot/pull/2382
- Print info messages to stdout instead of stderr by @borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2639
- Fix CloseOnLastWindow caused by tool change by @veracioux in https://github.com/flameshot-org/flameshot/pull/2645
- fix unexpected close when launch external app by @Alaskra in https://github.com/flameshot-org/flameshot/pull/2617
- Fix sidebar slider not resizing by @borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2530
- fixed segfault when screen number exceeds screen count by @borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2534
- Remove extra timer shots when moving selection with keyboard by @veracioux in https://github.com/flameshot-org/flameshot/pull/2545
- Fix pinwidget save by @Alaskra in https://github.com/flameshot-org/flameshot/pull/2549
- Config error fix by @vozdeckyl in https://github.com/flameshot-org/flameshot/pull/2552
- Fix missing icon on snap by @vozdeckyl in https://github.com/flameshot-org/flameshot/pull/2616
- Fix selection offset by @veracioux in https://github.com/flameshot-org/flameshot/pull/2630
- Suggest setting XDG_CURRENT_DESKTOP if DE cannot be detected by @greenfoo in https://github.com/flameshot-org/flameshot/pull/2634
- Fix saveAsFileExtension in example config by @veracioux in https://github.com/flameshot-org/flameshot/pull/2414
- fixed high CPU usage on pin by @borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2502
- Fix alignment bug and applied many clang format warnings by @borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2448
- fix the --print-geometry for zsh by @mmahmoudian in https://github.com/flameshot-org/flameshot/pull/2437
- fix bug on macos with save dialog by @borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2379
- allow numpad numbers to resize and fix text artifacting on large resize by @borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2386
- Zooming in/out happens at different speed by @AndreaMarangoni in https://github.com/flameshot-org/flameshot/pull/2378
- fix: arrow tool glitches by @UnkwUsr in https://github.com/flameshot-org/flameshot/pull/2395
- Fix double click by @borgmanJeremy in https://github.com/flameshot-org/flameshot/pull/2432
- Improve Colorpicker by @deo002 in https://github.com/flameshot-org/flameshot/pull/2403
## New Contributors
* @AndreaMarangoni made their first contribution in https://github.com/flameshot-org/flameshot/pull/2304
* @samrocketman made their first contribution in https://github.com/flameshot-org/flameshot/pull/2311
* @affirVega made their first contribution in https://github.com/flameshot-org/flameshot/pull/2108
* @Proton-459 made their first contribution in https://github.com/flameshot-org/flameshot/pull/2357
* @SilasDo made their first contribution in https://github.com/flameshot-org/flameshot/pull/2219
* @UnkwUsr made their first contribution in https://github.com/flameshot-org/flameshot/pull/2395
* @ricardovsilva made their first contribution in https://github.com/flameshot-org/flameshot/pull/2518
* @greenfoo made their first contribution in https://github.com/flameshot-org/flameshot/pull/2495
* @zhangfuwen made their first contribution in https://github.com/flameshot-org/flameshot/pull/2520
* @dzg made their first contribution in https://github.com/flameshot-org/flameshot/pull/2566
* @Alaskra made their first contribution in https://github.com/flameshot-org/flameshot/pull/2549
* @vozdeckyl made their first contribution in https://github.com/flameshot-org/flameshot/pull/2552
* @henetiriki made their first contribution in https://github.com/flameshot-org/flameshot/pull/2609
**Full Changelog**: https://github.com/flameshot-org/flameshot/compare/v11.0.0...v12.0.rc1
+23
View File
@@ -0,0 +1,23 @@
# Checklist for making a new release
These are the code changes that need to take place:
- [ ] Update version in `CMakeLists.txt`
- [ ] Update version and changelog at `packaging/debian/changelog`
- [ ] Update version and changelog at `packaging/rpm/flameshot.spec`
- [ ] Update `data/appdata/flameshot.metainfo.xml`
- [ ] Update macOS version in `cmake/modules/MacOSXBundleInfo.plist.in`
- [ ] Commit and push to a PR
- [ ] Merge PR to main
- [ ] Create and push git tag on main
- [ ] Manually retrigger the Github actions so it uses the latest git tag
These are the steps for actually making the release:
- [ ] Download all binaries from CI run started from PR related to code changes shown above
- [ ] Create sha256 for each binary and compare against sha256 shown in the CI to verify there was no corruption or inserted malware
- [ ] Create a new "New Release" in Github and explain changes in release notes
- [ ] Upload all binaries and sha's
- [ ] Update flatpak manifest for Flathub: https://github.com/flathub/org.flameshot.Flameshot
- [ ] Push snapcraft edge release to stable
- [ ] If this is a major release coordinate with sign path on signed windows binaries
- [ ] Update change log on [website](https://github.com/flameshot-org/flameshot-org.github.io/) `data/changelog.md`
- [ ] Update version on [website](https://github.com/flameshot-org/flameshot-org.github.io/blob/master/_coverpage.md)
+94
View File
@@ -0,0 +1,94 @@
# Sway and wlroots support
Flameshot currently supports Sway and other wlroots based Wayland compositors through [xdg-desktop-portal-wlr](https://github.com/emersion/xdg-desktop-portal-wlr). However, due to the way dbus works, there may be some extra steps required for the integration to work properly.
## Basic steps
The following packages need to be installed: `xdg-desktop-portal xdg-desktop-portal-wlr grim`. Please ensure your distro packages these, or install them manually.
Ensure that environment variables are set properly. If your distro does not set them automatically, use a launch script to export `XDG_CURRENT_DESKTOP=sway` or `XDG_CURRENT_DESKTOP=river` **before** Sway or River is launched.
```sh
#!/bin/bash
export SDL_VIDEODRIVER=wayland
export _JAVA_AWT_WM_NONREPARENTING=1
export QT_QPA_PLATFORM=wayland
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_DESKTOP=sway
exec sway
```
or
```sh
#!/bin/bash
export SDL_VIDEODRIVER=wayland
export _JAVA_AWT_WM_NONREPARENTING=1
export QT_QPA_PLATFORM=wayland
export XDG_CURRENT_DESKTOP=river
export XDG_SESSION_DESKTOP=river
exec river
```
You will also need to ensure that systemd/dbus is aware of these environment variables; this should be done **in your sway or river config** so that the DISPLAY and WAYLAND_DISPLAY variables are defined.
(taken from [Sway wiki](https://github.com/swaywm/sway/wiki#gtk-applications-take-20-seconds-to-start)):
```sh
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
```
To ensure that Flameshot is correctly positioned on multiple outputs (monitors) add this rule to your Sway config:
```
for_window [app_id="flameshot"] border pixel 0, floating enable, fullscreen disable, move absolute position 0 0
```
and add the following on your River config:
```
riverctl rule-add -app-id "flameshot" float
```
Otherwise, flameshot will not take all of the screen and tiles its window instead like a normal application. Note however, that some clipboard stuff is broken so it might be good to save your screenshot as a file while having it copied to a clipboard in case if clipboard does some weird stuff like not pasting the overall screenshot.
Starting from 0.17.0 xdg-desktop-portal requires a configuration file (e.g. in ~/.config/xdg-desktop-portal/sway-portals.conf):
(take from [issues#3363](https://github.com/flameshot-org/flameshot/issues/3363))
```sh
[preferred]
# use xdg-desktop-portal-gtk for every portal interface
default=gtk
# except for the xdg-desktop-portal-wlr supplied interfaces
org.freedesktop.impl.portal.Screencast=wlr
org.freedesktop.impl.portal.Screenshot=wlr
```
## Troubleshooting
Q) Flameshot doesn't take a screenshot, it just hangs!
A) Please ensure that the packages are installed, and that the variables are exported.
This is usually caused by Flameshot receiving no response from the desktop portal. This can be verified by running `dbus-monitor --session sender=org.freedesktop.portal.Desktop destination=org.freedesktop.portal.Desktop`.
Q) Flameshot takes one screenshot, then won't take anymore!
A) There is a bug in xdg-desktop-portal-wlr and Flameshot causing calls with the same token to fail. If you see a sdbus vtable error in the xdpw logs, either used the [patched version](https://github.com/nullobsi/xdg-desktop-portal-wlr/tree/improve-screenshot) or update Flameshot to the latest master.
# River wlroots support
Like mentioned above, Flameshot now works on wlroots based Wayland compositors, however, there is a weird problem with river and that is when setting `XDG_CURRENT_DESKTOP=river`, Flameshot won't work. The fix is you need to trick Flameshot that you are on `sway`. Hence, you need to run river like so:
```sh
XDG_CURRENT_DESKTOP=sway dbus-run-session river
```
and add the following on your config such as in `$HOME/.config/river/init`
```
riverctl float-filter-add "flameshot"
```
Otherwise, Flameshot will not take all of the screen and tiles its window instead like a normal application.
#### For more information, please refer to https://github.com/emersion/xdg-desktop-portal-wlr/wiki/%22It-doesn't-work%22-Troubleshooting-Checklist
+2
View File
@@ -0,0 +1,2 @@
output
mkdoxy-generated
+9
View File
@@ -0,0 +1,9 @@
serve:
mkdocs serve --dev-addr localhost:8080 --watch ../../src
build:
mkdocs build
@echo "Post-processing..."
@bash post-process.sh
@echo "DONE."
clean:
rm -rf mkdoxy-generated output
+47
View File
@@ -0,0 +1,47 @@
site_name: Flameshot Developer Docs
site_url: https://flameshot.org/docs/dev/
repo_url: https://github.com/flameshot-org/flameshot/
edit_uri: tree/master/docs/dev/src
docs_dir: src
site_dir: output
markdown_extensions:
- admonition
- attr_list
- toc:
permalink: "#"
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
plugins:
- search
- mkdoxy:
projects:
flameshot:
src-dirs: ../../src/
full-doc: True
doxy-cfg:
FILE_PATTERNS: "*.cpp *.h"
# #TODO for some reason this causes an exception
EXCLUDE_PATTERNS: "*/capturetool.h"
FULL_PATH_NAMES: "NO"
SHOW_USED_FILES: "NO"
RECURSIVE: True
save-api: mkdoxy-generated
debug: True
ignore-errors: False
theme:
name: material
logo: https://flameshot.org/flameshot-icon.svg
nav:
- Overview: index.md
- Debugging: debugging.md
- FAQ: faq.md
- 'Maintaining the documentation': docs.md
- API:
- Classes: flameshot/classes.md
- 'Class Hierarchy': flameshot/hierarchy.md
- Files: flameshot/files.md
+19
View File
@@ -0,0 +1,19 @@
# Only run this script from the Makefile
shopt -s globstar
cd output
# Classes backlink to the ClassList in their breadcrumbs. We use the ClassIndex
# instead.
rm -rf flameshot/annotated
ln -sf classes flameshot/annotated
# Hide 'Edit this page button' from the auto-generated docs pages
# It would be better to change the button to link to the file on github, but
# it seems like too much work right now.
sed -i 's|title="Edit this page"|& style="display: none !important"|' flameshot/*/*.html
# MkDoxy adds Qt classes into the class hierarchy. We don't want that.
sed -i 's|<li><strong>class</strong> <strong>Q[^<]*</strong> </li>||' flameshot/*/*.html
# vim: filetype=bash
+16
View File
@@ -0,0 +1,16 @@
# Debugging
## `FLAMESHOT_DEBUG_CAPTURE`
With this cmake variable set to `ON`, the flameshot capture GUI window won't bypass the
window manager. This allows you to manipulate the capture GUI window like any
other window while debugging.
This can be useful if a debugging breakpoint is triggered while flameshot is in
full screen mode. Without this variable, you might have trouble inspecting the
code due to a frozen full-screen window.
Usage:
```shell
cmake -DFLAMESHOT_DEBUG_CAPTURE=ON ...
```
+141
View File
@@ -0,0 +1,141 @@
# Maintaining the documentation
The narrative documentation is written in markdown and built into HTML using
[MkDocs][mkdocs], particularly the [MkDocs material theme][mkdocs-material]. The
source code documentation is generated using Doxygen and adapted for MkDocs
using [MkDoxy][mkdoxy] (a tweaked custom fork of the original). The source code
of this documentation can be found [here][doc-source].
!!! tip
In order to edit a page from the documentation, click the :material-pencil:
button in the top right corner of the page. Please note that this button
won't work within the API section of the documentation - the button is
removed from there during [post-processing][], but it will still be visible
when [serving the website locally][serving-locally].
## Serving locally
To serve the documentation locally, run the `make serve` target in the
`docs/dev` directory. The server is available at the port designated in the
output of the command.
## Notes and conventions
- When you add new files or rename existing files or section names, be sure to
edit the `nav` property of [mkdocs.yml][mkdocs.yml].
- Always insert links as [reference style
links][markdown:reference-style-links]. This will make the docs source code
more readable and make broken links more easily detectable and replaceable.
### Post-processing
There are some tweaks we make to the generated HTML documentation. We do that in
the `make build` target, by running the [post-process.sh][post-process.sh]
script. To see what post-processing we do, see that file.
For this reason, the version of the documentation served locally using `make
serve` will not match the generated HTML documentation 100%. But those
inconsistencies are few and minor.
## Dependencies
```shell
pip install \
mkdocs \
mkdocs-material \
git+https://github.com/veracioux/[email protected]
```
!!! note
We use a forked version of [mkdoxy][mkdoxy-original] that can be found
[here][mkdoxy], that fixes some annoying things from the original.
## Deployment
The developer documentation is served from the official Flameshot website
[flameshot.org][website]. Here's how.
The official website itself is served from this [repo][website-repo]. That repo
contains the user documentation. It's deployed using GitHub pages -- the served
files can be found on the [gh-pages][] branch of that repo. This branch is
automatically created by the [build][website-build] workflow on master.
To make the developer docs available on the official site, we use a custom
GitHub action called [deploy-dev-docs][] in the [flameshot][] repo. This action
will build and deploy this documentation into the `docs/dev` subdirectory of the
[gh-pages][] branch.
### The deploy-dev-docs GitHub workflow
This workflow checks out the flameshot website [repo][website-repo] and does the following:
- Creates a clean [dev-docs-staging][] branch (we'll explain why, below).
- Generates the developer docs under `docs/dev` there and makes a commit
- Checks out the [gh-pages][] branch and makes the same commit there
- Force-pushes the dev-docs-staging branch to the website repo
- Pushes the gh-pages branch to the website repo
Since the [gh-pages][] branch is re-created from scratch by the [website
deployment workflow][website-build], the commit that added the developer
documentation will be lost. That's why we have to re-apply the commit during the
[website deployment workflow][website-build] as well. **That is the reason why
we created the** [**dev-docs-staging**][dev-docs-staging] **branch in the first
place.**
!!! note
The deploy-dev-docs workflow is set to run on the `docs` branch as well as `master`.
This branch is used for debugging the developer docs and its associated
workflows, without polluting the `master` branch with unnecessary commits.
#### Access tokens
In order to make changes to the [website repo][website-repo] from within a
workflow in the [flameshot repo][flameshot], the workflow needs to use an access
token, which it obtains from the `TOKEN_PUSH_TO_WEBSITE_REPO` secret.
The following process was used to set it up:
1. A flameshot organization member with write access must create a personal
access token (PAT) [here][PAT] with write access to the [website repo][website-repo].
2. A secret named `TOKEN_PUSH_TO_WEBSITE_REPO` must be added to the
[flameshot][] repo and its value must be set to the PAT. This can be done
[here][action-secrets].
For best security practice, the token should be set to expire after some time
(currently ~6 months). The token can be regenerated without the need to recreate
it. After regeneration you will need to update the `TOKEN_PUSH_TO_WEBSITE_REPO`
secret, which can be done [here][edit-secret].
!!! tip
The currently active PAT is owned by [veracioux][] and is set to expire on July
31 2024. If you notice the token has expired, ask him to re-generate it.
<!-- Internal links -->
[post-processing]: #post-processing
[serving-locally]: #serving-locally
<!-- Flameshot-related pages -->
[flameshot]: https://github.com/flameshot-org/flameshot
[website]: https://flameshot.org
[doc-source]: https://github.com/flameshot-org/flameshot/tree/master/docs/dev
[website-repo]: https://github.com/flameshot-org/flameshot-org.github.io
[gh-pages]: https://github.com/flameshot-org/flameshot-org.github.io/tree/gh-pages
[dev-docs-staging]: https://github.com/flameshot-org/flameshot-org.github.io/tree/dev-docs-staging
[action-secrets]: https://github.com/flameshot-org/flameshot/settings/secrets/actions
[edit-secret]: https://github.com/flameshot-org/flameshot/settings/secrets/actions/TOKEN_PUSH_TO_WEBSITE_REPO
<!-- Files in flameshot repo -->
[mkdocs.yml]: https://github.com/flameshot-org/flameshot/blob/master/docs/dev/mkdocs.yml
[post-process.sh]: https://github.com/flameshot-org/flameshot/blob/master/docs/dev/post-process.sh
[deploy-dev-docs]: https://github.com/flameshot-org/flameshot/blob/master/.github/workflows/deploy-dev-docs.yml
<!-- Files in flameshot website repo -->
[website-build]: https://github.com/flameshot-org/flameshot-org.github.io/blob/master/.github/workflows/build.yml
<!-- External pages -->
[markdown:reference-style-links]: https://www.markdownguide.org/basic-syntax/#reference-style-links
[mkdocs]: https://www.mkdocs.org/
[mkdocs-material]: https://squidfunk.github.io/mkdocs-material
[mkdoxy-original]: https://github.com/JakubAndrysek/mkdoxy
[mkdoxy]: https://github.com/veracioux/mkdoxy
[PAT]: https://github.com/settings/tokens?type=beta
[veracioux]: https://github.com/veracioux
+47
View File
@@ -0,0 +1,47 @@
# FAQ
!!! todo
Incomplete page.
### How do I create a new subcommand?
### How do I add a new tool?
### How do I add a new config setting?
There are currently two groups of settings: `General` and `Shortcuts`.
The necessary steps are usually the following:
- Determine a name for the setting - for a general setting, it must be a valid
C++ identifier, for a shortcut it must be the name of a tool type from TODO.
- Add a getter and a setter for the setting in [`ConfigHandler`][ConfigHandler].
For most settings you should use the
[`CONFIG_GETTER_SETTER`][CONFIG_GETTER_SETTER] macro. If your setting is
unusual enough you may need to use [`CONFIG_GETTER`][CONFIG_GETTER] or
[`CONFIG_SETTER`][CONFIG_SETTER] individually, or even need to create the
methods manually.
- If you need custom validation or conversion for the value, you must create a
subclass of [`ValueHandler`][ValueHandler]. Otherwise you can use one of the
existing ones in [valuehandler.h][].
- If you want to make your setting available in the configuration GUI (usually
you do), you should add the appropriate widgets into one of the tabs of
[`ConfigWindow`][ConfigWindow]. If your setting doesn't fit into any of the
existing tabs, you can add a new one, but please discuss it with us first.
To get a deeper understanding of how the configuration works, please see
[Configuration][config].
### How do I add a new export action? (@borgmanJeremy @mehrad This is my preferred terminology over final action, need consensus)
[config]: index.md#configuration
[confighandler.h]: flameshot/confighandler_8h
[confighandler.cpp]: flameshot/confighandler_8cpp
[valuehandler.h]: flameshot/valuehandler_8h
[ValueHandler]: flameshot/classValueHandler
[ConfigHandler]: flameshot/classConfigHandler
[ConfigWindow]: flameshot/classConfigWindow
[CONFIG_GETTER_SETTER]: flameshot/confighandler_8h/#define-config_getter_setter
[CONFIG_GETTER]: flameshot/confighandler_8h/#define-config_getter
[CONFIG_SETTER]: flameshot/confighandler_8h/#define-config_setter
+127
View File
@@ -0,0 +1,127 @@
# Flameshot developer docs
Thank you for your interest in developing flameshot. This developer
documentation (hopefully) has an intuitive structure. It tries to describe what
code is run when a user performs an action in Flameshot.
!!! important
**Please read this entire page. It will make your life a whole lot easier when
contributing to Flameshot. If you know exactly what you want to work on, you
should look at [FAQ](./faq) **
## Project structure
Flameshot is built on C++/Qt5 with CMake as its build system. The source code is
located under `src/`. The entrypoint is `src/main.cpp`.
### `main.cpp`
Flameshot provides both a GUI and a CLI (the latter currently works only on
Linux and macOS).
### Build system
The main cmake file is `CMakeLists.txt` in the project root. It `include`s some
files from the `cmake/` directory as well. These files together control some
more general aspects of the build process, like project information, packaging,
caching etc.
There is also the file `src/CMakeLists.txt`. It mostly defines how the source
files are compiled into targets and how the external libraries are linked. It
does some other stuff too. Currently, there isn't a clear separation of concerns
between `CMakeLists.txt` and `src/CMakeLists.txt`. In the future we should
refactor these files to make it more clear why each of them exists.
## What happens when I launch flameshot?
There are two ways to launch flameshot: daemon mode and single-action mode. In
both modes, an instance of [`Flameshot`][Flameshot] is created via
[`Flameshot::start()`][Flameshot::start]. [`Flameshot`][Flameshot] provides the
high level API for interacting with flameshot; and its methods mimic the CLI
subcommands a great deal. This object is a singleton, so it can only be created
once. It is accessed as [`Flameshot::instance()`][Flameshot::instance].
!!! note
On Windows, only daemon mode is currently supported.
### Single-action mode (via command line interface)
Single-action mode (also called one-off mode) is triggered when flameshot is
launched with a command line argument - for example as `flameshot gui`. As its
name implies, it performs a single action, such as "take a screenshot
interactively by opening a GUI" or "take a screenshot of the entire screen",
etc. Afterwards, Flameshot quits.
### Daemon mode
This mode is triggered when the `flameshot` command is launched. In this mode, a
flameshot process is started in the background. A system tray is displayed if
the user hasn't disabled it in the config. In addition to [`Flameshot::start()`][Flameshot::start],
if the current process is the daemon, it also calls [`FlameshotDaemon::start()`][FlameshotDaemon::start]
during initialization.
The daemon has the following purposes:
- Run in the background, wait for the user to press a hotkey, and perform
corresponding action.
This is true for **Windows** and **macOS**, but not for **Linux**. On Linux, hotkeys
are meant to be handled by the desktop environment or equivalent.
- Provide a system tray that the user can click to initiate actions via context
menu
- Periodically check for updates and notify the user
- Act as a host for persistent phenomena. Example: On X11 (linux), when a program
inserts content into the clipboard, it must keep running so the content
persists in the clipboard.
!!! note
All of the above are user-configurable.
#### `FlameshotDaemon`
The class [`FlameshotDaemon`][FlameshotDaemon] handles all communication with
the daemon. The class provides public static methods that are designed so that
the caller does not need to know if the current process is a flameshot daemon or
a single-action invocation of Flameshot. If the current process is the daemon,
then the static methods of [`FlameshotDaemon`][FlameshotDaemon] will call the
corresponding instance methods of the singleton. If not, the current process
will communicate with the daemon process via D-Bus. Then, within the daemon
process, those D-Bus calls will be translated into
[`FlameshotDaemon`][FlameshotDaemon] instance method calls.
## Configuration
The configuration is handled by [`ConfigHandler`][ConfigHandler]. It is
decoupled from any user interface, so it serves the configuration for both the
GUI and CLI. All configuration settings recognized by the config files are
defined as getters in this class. There are also setters for each setting, named
as per the usual convention. For example, the setting `savePath` has a getter
named `savePath` and a setter named `setSavePath`. Before working on a new
config setting for flameshot, please read [this FAQ
entry][faq:add-config-setting].
### Interesting notes
- [`ConfigHandler`][ConfigHandler] is based on `QSettings`
- The configuration uses the `ini` format
- The configuration is automatically reloaded when the config file changes
## Conventions
- Always use `&Class::signal` and `&Class::slot` instead of `SIGNAL(signal())`
and `SLOT(slot())`. This usually provides better code introspection and makes
refactoring easier and less error-prone.
[Flameshot]: flameshot/classFlameshot
[Flameshot::instance]: flameshot/classFlameshot#function-instance
[Flameshot::start]: flameshot/classFlameshot#function-start
[ConfigHandler]: flameshot/classConfigHandler
[FlameshotDaemon]: flameshot/classFlameshotDaemon
[FlameshotDaemon::start]: flameshot/classFlameshotDaemon#function-start
[confighandler.h]: flameshot/confighandler_8h
[confighandler.cpp]: flameshot/confighandler_8cpp
[faq:add-config-setting]: faq/#how-do-i-add-a-new-config-setting
[matrix-room]: https://matrix.to/#/#flameshot-org:matrix.org
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 710 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

@@ -0,0 +1,149 @@
[Data]
DataCount=1
[Data_1]
Comment=Shortcuts for taking screenshots with Flameshot
DataCount=5
Enabled=true
Name=Flameshot
SystemGroup=0
Type=ACTION_DATA_GROUP
[Data_1Conditions]
Comment=
ConditionsCount=0
[Data_1_1]
Comment=Start the Flameshot screenshot tool and take a screenshot
Enabled=true
Name=Take screenshot
Type=SIMPLE_ACTION_DATA
[Data_1_1Actions]
ActionsCount=1
[Data_1_1Actions0]
CommandURL=flameshot gui
Type=COMMAND_URL
[Data_1_1Conditions]
Comment=
ConditionsCount=0
[Data_1_1Triggers]
Comment=Simple_action
TriggersCount=1
[Data_1_1Triggers0]
Key=Print
Type=SHORTCUT
Uuid={550679a7-6038-4d71-9d70-045dee9e7ad0}
[Data_1_2]
Comment=Wait for 3 seconds, then start the Flameshot screenshot tool and take a screenshot
Enabled=true
Name=Take screenshot with delay
Type=SIMPLE_ACTION_DATA
[Data_1_2Actions]
ActionsCount=1
[Data_1_2Actions0]
CommandURL=flameshot gui --delay 3000
Type=COMMAND_URL
[Data_1_2Conditions]
Comment=
ConditionsCount=0
[Data_1_2Triggers]
Comment=Simple_action
TriggersCount=1
[Data_1_2Triggers0]
Key=Ctrl+Print
Type=SHORTCUT
Uuid={13cf7a93-9bae-4864-b6f6-dbe09e1b548a}
[Data_1_3]
Comment=Take a full-screen (all monitors) screenshot and save it
Enabled=true
Name=Take full-screen screenshot and save
Type=SIMPLE_ACTION_DATA
[Data_1_3Actions]
ActionsCount=1
[Data_1_3Actions0]
CommandURL=flameshot full
Type=COMMAND_URL
[Data_1_3Conditions]
Comment=
ConditionsCount=0
[Data_1_3Triggers]
Comment=Simple_action
TriggersCount=1
[Data_1_3Triggers0]
Key=Shift+Print
Type=SHORTCUT
Uuid={32eeef66-9df9-4ff0-8bca-9c80941d74b2}
[Data_1_4]
Comment=Take a full-screen (all monitors) screenshot and copy it to the clipboard and ask where to save
Enabled=true
Name=Take full-screen screenshot and copy it to clipboard
Type=SIMPLE_ACTION_DATA
[Data_1_4Actions]
ActionsCount=1
[Data_1_4Actions0]
CommandURL=flameshot full --clipboard
Type=COMMAND_URL
[Data_1_4Conditions]
Comment=
ConditionsCount=0
[Data_1_4Triggers]
Comment=Simple_action
TriggersCount=1
[Data_1_4Triggers0]
Key=Ctrl+Shift+Print
Type=SHORTCUT
Uuid={7a4033b1-f641-4dab-9c4e-78bf3fa0ea8c}
[Data_1_5]
Comment=Open the Flameshot Launcher
Enabled=false
Name=Open Flameshot Launcher
Type=SIMPLE_ACTION_DATA
[Data_1_5Actions]
ActionsCount=1
[Data_1_5Actions0]
CommandURL=flameshot launcher
Type=COMMAND_URL
[Data_1_5Conditions]
Comment=
ConditionsCount=0
[Data_1_5Triggers]
Comment=Simple_action
TriggersCount=1
[Data_1_5Triggers0]
Key=
Type=SHORTCUT
Uuid={b0f9c859-bf84-42c6-8ae0-94da1a616cf1}
[Main]
AllowMerge=false
ImportId=Flameshot
Version=2