Flameshot
Flameshot is a powerful screenshot and screenshot annotation tool. Flameshot allows the user to take a screenshot and then draw, write text, blur, crop, and otherwise edit screenshots with ease.
Install
For X11 you can install Flameshot by simply adding it to your configuration file.
environment.systemPackages = with pkgs; [
flameshot
];
Install on Wayland
In order to use Flameshot on Wayland you will need to install Grim and configure Flameshot to use it.
Install Grim
environment.systemPackages = with pkgs; [
grim
];
Configure Flameshot
You may do this through Home Manager, or you may configure it manually in ~/.config/flameshot.
services.flameshot = {
# Also installs/enables flameshot
enable = true;
settings = {
General = {
useGrimAdapter = true;
# Stops warnings for using Grim
disabledGrimWarning = true;
};
};
};
Home Manager
You can configure Flameshot settings through Home Manager with the following syntax. Additional settings may be found on the Flameshot Github and adapted into Nix. See documented settings in the Home Manager Appendix - services.flameshot.
services.flameshot = {
enable = true;
settings = {
General = {
# More settings may be found on the Flameshot Github
# Save Path
savePath = "/home/user/Screenshots";
# Tray
disabledTrayIcon = true;
# Greeting message
showStartupLaunchMessage = false;
# Default file extension for screenshots (.png by default)
saveAsFileExtension = ".png";
# Desktop notifications
showDesktopNotification = true;
# Notification for cancelled screenshot
showAbortNotification = false;
# Whether to show the info panel in the center in GUI mode
showHelp = true;
# Whether to show the left side button in GUI mode
showSidePanelButton = true;
# Whether to enable legacy (pre-xdg-desktop-portal) screenshotting on X11
useX11LegacyScreenshot = true;
# Whether to skip display selection prompt (X11-only)
captureActiveMonitor = true;
# Color Customization
uiColor = "#740096";
contrastUiColor = "#270032";
drawColor = "#ff0000";
# For Wayland (Install Grim seperately)
useGrimAdapter = true;
# Stops warnings for using Grim
disabledGrimWarning = true;
};
};
};
Setting Shortcuts
Setting shortcuts is different depending on your Desktop Environment. You can can check Flameshot CLI commands that you can use for shortcuts by running man flameshot.
Sway
wayland.windowManager.sway = {
enable = true;
# Sets modifier to Super Key
modifier = "Mod4";
config = {
keybindings = lib.mkOptionDefault {
# Manual screenshot GUI that saves to clipboard and closes on selection.
"${modifier}+Shift+s" = "exec flameshot gui --clipboard --accept-on-select";
# Takes a screenshot of the screen containing the cursor.
"${modifier}+Shift+a" = "exec flameshot screen --clipboard";
# Takes a manual screenshot that shows options after selection.
"Print" = "exec flameshot gui";
};
};
};
Troubleshooting
With the release of v14.0.0 of Flameshot, users may experience several issues depending on their setup. This section will cover most common situations and their solutions.
Unable to take a screenshot: portal timed out/screenshot aborted
By default, Flameshot now uses XDG desktop portal calls for screenshotting. This necessitates having xdg-desktop-portal + portal(s) with Access and Screenshot interfaces installed (see ArchWiki's Portal Backends list). Without those, screenshot attempts will fail.
Users on X11 window managers will be unable to use the default method; no portal provides a Screenshot interface there. The solution is to enable "Use legacy X11 screenshot" method located in the "General" tab of Flameshot GUI config. If using Home Manager's Flameshot module, this option can be enabled by adding useX11LegacyScreenshot = true to the settings configuration.
Multi-monitor screenshot prompt
When taking screenshots, Flameshot will now open a prompt on multi-monitor setups to choose a display to capture. This is contrast with the pre-v14 behaviour, where capturing was rendered across all screens. Users on X11 may disable this behaviour by enabling "Capture active monitor (skip monitor selection)" in the "General" tab Flameshot GUI config. If using Home Manager's Flameshot module, this option can be enabled by adding captureActiveMonitor=true to the settings configuration.
Wayland users are unable to disable this due to its security design and lack of cross-platform solutions. To circumvent this behaviour, it is recommended to change keybind from default flameshot gui to, for example flameshot screen --edit. This will capture the currently active display (wherever the cursor is) and open the GUI editor. This will occasionally incorrectly select a display, however.
Incorrect capture overlay render
Some users, most commonly on X11 window managers, may experience regressions in how screen capture is rendered, more so on multi-monitor setups. Instead of opening as an overlay, it might open as a separate window. The cause is currently unknown and solutions may vary depending on how window management is implemented by each manager.